Encrypts data using AES-128-CBC mode.
The 16-byte encryption key.
The data to encrypt.
The 16-byte initialization vector. Defaults to zero IV.
A promise that resolves to the encrypted data.
Error if the key is not exactly 16 bytes.
const encrypted = await aes128cbcEncrypt(key, plaintext, iv) Copy
const encrypted = await aes128cbcEncrypt(key, plaintext, iv)
Encrypts data using AES-128-CBC mode.