Hello All,
I am trying to troubleshoot a class that a previous colleague/developer wrote that used 3DES encryption. Up until today, the app and class were functioning correctly.
Snippet of method:
...
try {
Cipher myCipher = Cipher.getInstance("DES.....");
myCipher.init(Cipher.ENCRYPT_MODE, myKey);
byte[] inByte = myEncryptedString.getBytes("UTF8");
byte[] outByte = cipher.doFinal(inByte);
BASE64Encoder myEncoder = new BASE64Encoder();
newEncryptedString = myEncoder .encode(output);
}
.....
Unfortuantely I have little experience with java.crypto and would ask for any help in troubleshooting the following exception I'm receiving:
Invalid key length: 24 bytes
Thanks for any help you might be able to suggest!!