I need to encrypt certainly string from client-side (JavaScript) and decrypt from server-side (Java), so I found CryptoJS and I write the code with the same params/configuration
Very usefull example SoldierCorp, thank you!
Few things to improve your example:
in javascript replace on
padding: CryptoJS.pad.Pkcs7
in java replace on
algorithm = "AES/CBC/PKCS5Padding"
in javascript replace on
var key = CryptoJS.MD5("Secret Passphrase");
in java replace on
byte[] keyValue = org.apache.commons.codec.digest.DigestUtils.md5("Secret Passphrase");