You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the length of iv is less than 16, how does 'crypto-js' pad it (make the iv length expanded to the length of 16)?
for example i use the following code, what is the ’iv‘ actually used during the encryption process?
like '432100000000'?
const CryptoJS = require('crypto-js')
const key = CryptoJS.enc.Utf8.parse('12345678ABCD')
const iv = CryptoJS.enc.Utf8.parse('4321')
let srcs = CryptoJS.enc.Utf8.parse(word)
let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 })
Thank you so much
The text was updated successfully, but these errors were encountered:
ZHAO-Clara
changed the title
If the length of iv is less than 12, how does 'crypto-js' pad it (make the iv length expanded to the length of 12)
If the length of iv is less than 16, how does 'crypto-js' pad it (make the iv length expanded to the length of 16)
Apr 1, 2024
If the length of iv is less than 16, how does 'crypto-js' pad it (make the iv length expanded to the length of 16)?
for example i use the following code, what is the ’iv‘ actually used during the encryption process?
like '432100000000'?
Thank you so much
The text was updated successfully, but these errors were encountered: