- First, look at http://stackoverflow.com/questions/15554296/simple-java-aes-encrypt-decrypt-example to understand a simple AES Encrypt and Decrypt
- Second, look at Apache Commons's http://commons.apache.org/proper/commons-codec/ for the ability to translate the raw binary string into a Base64/HEX value.
- Third, look at http://stackoverflow.com/questions/18362137/encryption-with-aes-256-java to understand how encryption works with Base64 conversion for DB storage
- Next, look at http://stackoverflow.com/questions/992019/java-256-bit-aes-password-based-encryption for detailed AES256 encryption/decryption
- I used the code from "After reading through erickson's suggestions...". With 1 small comment:
// I don't think this should happen, but just in case.. if (tmp != null) fout.write (tmp);- This is used for muti-part encryption. So make sure you don't just delete it or comment it out.
- Finally, look at Java 6 or Java 7 to understand how to overwrite the default 128 limit. Please read the disclaimer. I don't want anyone getting in trouble for US government export control rules.
Showing posts with label JAVA. Show all posts
Showing posts with label JAVA. Show all posts
Thursday, January 2, 2014
Java AES Encryption
Java AES Encryption (256 Bit):
Subscribe to:
Posts (Atom)