加密在旧版Java系统中完成:
Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");
cipher.init(1, new SecretKeySpec(theKey.getBytes(), "BlowFish"));
byte[] arrayOfByte = cipher.doFinal(inputString.getBytes());
String result = new BASE64Encoder().encode(arrayOfByte);
我试图用openssl复制它,但我得不到相同的输出。
我在尝试:
openssl enc -base64 -A -bf-ecb -nosalt -in input -pass pass:secret