小编Ale*_*ais的帖子

CryptoJS encrypt in aes-256-cbc returns an unexpected value

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)

javascript cryptojs

5
推荐指数
1
解决办法
7393
查看次数

标签 统计

cryptojs ×1

javascript ×1