pdf-lite - v1.0.1
    Preparing search index...
    • Computes the /U value for RC4-128 PDF encryption. The /U value is used to verify the user password.

      Parameters

      • userPassword: ByteArray

        The user password.

      • oValue: ByteArray

        The /O value.

      • permissions: number

        The /P value (permissions flags).

      • id: ByteArray

        The first element of the /ID array.

      • encryptMetadata: boolean

        Whether to encrypt metadata.

      • Optionalrevision: number

        The encryption revision number.

      Returns Promise<ByteArray>

      A promise that resolves to the 32-byte /U value.

      const U = await computeUValueRc4_128(userPassword, O, permissions, fileId, true)