Creates an AES-256-CBC cipher for PDF encryption. The cipher prepends a zero IV to encrypted data during encryption and extracts the IV from the first 16 bytes during decryption.
The 32-byte encryption key.
A Cipher object with encrypt and decrypt methods.
const cipher = aes256(key)const encrypted = await cipher.encrypt(plaintext)const decrypted = await cipher.decrypt(encrypted) Copy
const cipher = aes256(key)const encrypted = await cipher.encrypt(plaintext)const decrypted = await cipher.decrypt(encrypted)
Creates an AES-256-CBC cipher for PDF encryption. The cipher prepends a zero IV to encrypted data during encryption and extracts the IV from the first 16 bytes during decryption.