pdf-lite - v1.0.1
    Preparing search index...

    V2 crypt filter using RC4 encryption. Implements the legacy RC4 stream cipher for PDF encryption.

    const filter = new V2CryptFilter({
    authEvent: 'DocOpen',
    securityHandler,
    length: 128
    })
    const encrypted = await filter.encrypt(data, objectNumber, generationNumber)

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    authEvent: "DocOpen" | "EFOpen"

    Authentication event trigger.

    cfm: "None" | "V2" | "AESV2" | "AESV3"

    Crypt filter method identifier.

    length: number

    Key length in bits.

    securityHandler?: PdfSecurityHandler

    Security handler for cryptographic operations.

    Methods

    • Gets an RC4 cipher for encryption/decryption.

      Parameters

      • OptionalobjectNumber: number

        The PDF object number for key derivation.

      • OptionalgenerationNumber: number

        The PDF generation number for key derivation.

      Returns Promise<Cipher>

      An RC4 cipher instance.

      Error if security handler is not set.