/**
 * PDF encryption: build Encrypt dict (Rev 5), traverse objects, encrypt streams and strings with AES-256-CBC.
 */
interface EncryptOptions {
    permissions?: number;
    encryptMetadata?: boolean;
}
/**
 * Encrypt a PDF with AES-256 (Rev 5). Input and output are PDF buffers.
 */
declare function encryptPDF(pdfBytes: Uint8Array, userPassword: string, ownerPassword?: string, options?: EncryptOptions): Promise<Uint8Array>;

/**
 * PDF decryption: read Encrypt dict, derive key, decrypt streams and strings (Rev 5 only).
 */
/**
 * Decrypt a PDF protected with AES-256 (Rev 5). Returns decrypted PDF buffer.
 * Throws if password is wrong or PDF is not Rev 5 encrypted.
 */
declare function decryptPDF(pdfBytes: Uint8Array, password: string): Promise<Uint8Array>;

export { type EncryptOptions, decryptPDF, encryptPDF };
