import { PdfDict, PdfValue } from '../pdf/objects.js'; /** Decrypts the strings and streams of an encrypted PDF, per indirect object. */ export interface Decryptor { /** * Decrypt one value with its owning object's number and generation (which seed * the per-object key). Recurses into arrays and dictionaries. */ decrypt: (value: PdfValue, objNum: number, gen: number) => PdfValue; } /** * Build a {@link Decryptor} from the `/Encrypt` dictionary and the file `/ID` * (ISO 32000 §7.6.3 / ISO 32000-2 §7.6.4). Derives the file key for the * handler's revision — R6/V5 via `/UE` (AES-256), else the legacy MD5 key — and * picks the cipher (RC4, AES-128 `/AESV2`, AES-256 `/AESV3`). * * @param encrypt The `/Encrypt` dictionary. * @param idArray The trailer `/ID` array (its first element seeds the legacy key). * @param password The user password (EP14); the empty string opens permissions-only encryption. * @returns A decryptor, or `undefined` for a non-Standard filter, an unencrypting * crypt filter, or a password that fails key validation. */ export declare function buildDecryptor(encrypt: PdfDict, idArray: PdfValue | undefined, password?: string): Decryptor | undefined;