I am encrypting some data using CryptoJS and comparing it to an online tool and I am not getting the same result. In fact the result from CryptoJS in not decryptable with the tool.
I am trying to encrypt in AES-256-CBC with the following parameters:
text = '111222333'
iv = 'I8zyA4lVhMCaJ5Kg'
key = '6fa979f20126cb08aa645a8f495f6d85'
Run Code Online (Sandbox Code Playgroud)
Here's my code:
let text = '111222333';
aesEncrypt(data) {
let key = '6fa979f20126cb08aa645a8f495f6d85'; //length 32
let iv = 'I8zyA4lVhMCaJ5Kg'; //length 16
let cipher = CryptoJS.AES.encrypt(data, key, …Run Code Online (Sandbox Code Playgroud)