DBMetadata-swing/src/main/java/com/github/abel533/utils/EncrypDES.java
public static String Encrytor(String str) throws Exception {
        // 根据密钥，对Cipher对象进行初始化，ENCRYPT_MODE表示加密模式
        Cipher c = getCipher();
        c.init(Cipher.ENCRYPT_MODE, deskey);
        byte[] src = str.getBytes();
        // 加密，结果保存进cipherByte
        byte[] cipherByte = c.doFinal(src);
        return EncrypDES.byteArr2HexStr(cipherByte);
    }
public static String Encrytor(String str) throws Exception {
        // 根据密钥，对Cipher对象进行初始化，ENCRYPT_MODE表示加密模式
        Cipher c = getCipher();
        c.init(Cipher.ENCRYPT_MODE, deskey);
        byte[] src = str.getBytes();
        // 加密，结果保存进cipherByte
        byte[] cipherByte = c.doFinal(src);
        return EncrypDES.byteArr2HexStr(cipherByte);
    }
加密

@param str
@return
@throws Exception