pdf-lite - v1.0.1
    Preparing search index...
    • Creates an AES-128-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.

      Parameters

      Returns Cipher

      A Cipher object with encrypt and decrypt methods.

      Error if the key is not exactly 16 bytes.

      const cipher = aes128(key)
      const encrypted = await cipher.encrypt(plaintext)
      const decrypted = await cipher.decrypt(encrypted)