PDFKeyDerivation

PDFKeyDerivation

Overview

PDFKeyDerivation is a class in Aspose.Pdf FOSS for Java.

PDF encryption key derivation algorithms.

Properties

NameTypeAccessDescription
PADDINGbyte[]ReadThe 32-byte padding string from Algorithm 2 step (a).

Methods

SignatureDescription
computeEncryptionKeyR2R4(password: byte[], encDict: PDFEncryptionDict, documentId: byte[])byte[]Algorithm 2: Compute encryption key for R2-R4.
computeEncryptionKeyR6User(password: byte[], encDict: PDFEncryptionDict)byte[]Compute encryption key for R=5/R=6 (AES-256).
computeEncryptionKeyR6Owner(password: byte[], encDict: PDFEncryptionDict)byte[]Compute encryption key for R=6 via owner password.
generateO_R2R4(ownerPassword: byte[], userPassword: byte[], keyLenBytes: int, R: int)byte[]Algorithm 3 (ISO 32000-1:2008, §7.6.3.4): computes the /O (owner) hash.
generateU_R2(encryptionKey: byte[])byte[]Algorithm 4 (ISO 32000-1:2008, §7.6.3.4): computes the /U hash for R=2.
generateU_R3R4(encryptionKey: byte[], documentId: byte[])byte[]Algorithm 5 (ISO 32000-1:2008, §7.6.3.4): computes the /U hash for R=3/4.
padPassword(password: byte[])byte[]Pads or truncates a password to exactly 32 bytes.
computeHashR6(password: byte[], salt: byte[], userKey: byte[])byte[]Computes the R=6 validation or key-derivation hash (ISO 32000-2, Algorithm 2.B).

See Also