Wednesday, September 25, 2019

Java AES Key Generation, Encryption and Decryption


Simple Note

Test File:
  TestAESUtils.java

Utils Implementation
  AESUtils.java
  CryptoUtils.java

If you get Illegal key size error, probably need to download JCE Jars, please refer to

InvalidKeyException Illegal key size

and

Java Security: Illegal key size or default parameters?


Other References

The article teach me use char[] over String
Why is char[] preferred over String for passwords?

This one teach me basic Encryption and Decryption
Initial bytes incorrect after Java AES/CBC decryption

How to convert between char[] and byte[]
Converting char[] to byte[]

No comments:

Post a Comment