Computes the Algorithm 2.B hash for PDF 2.0 AES-256 encryption. This iterative hash algorithm uses SHA-256, SHA-384, or SHA-512 based on intermediate results, running for at least 64 rounds.
The user or owner password.
The 8-byte validation or key salt.
The user key (required for owner password validation). Defaults to empty.
A promise that resolves to a 32-byte hash.
const hash = await computeAlgorithm2bHash(password, salt) Copy
const hash = await computeAlgorithm2bHash(password, salt)
Computes the Algorithm 2.B hash for PDF 2.0 AES-256 encryption. This iterative hash algorithm uses SHA-256, SHA-384, or SHA-512 based on intermediate results, running for at least 64 rounds.