Skip to main content

Module crypto

Module crypto 

Source
Expand description

PDF Standard Security Handler (encryption) — decryption side only.

This module implements just enough of the PDF 1.7 Standard Security Handler to decrypt documents produced by revisions 2 and 3 (RC4 with a 40-bit or 128-bit key) when the user password is empty. That covers the large majority of “encrypted to prevent editing but openable by anyone” PDFs that real-world documents ship with.

AES (V=4 / V=5, R=4..6), non-empty user passwords, and public-key security handlers are not implemented here and still fail up front with PdfError::Unsupported. They can be layered on top without changing this module’s public surface.

Structs§

StandardSecurityHandler

Enums§

SecurityRevision