Skip to main content

Module crypto

Module crypto 

Source
Expand description

PDF 加密与数字签名操作(ISO 32000)。

本模块分为两个子模块:

  • encrypt: 基于密码的加密(/V 4/R 4 AES-128 / /V 5 AES-256)。
  • sign: 数字签名(PKCS#7 分离式 SignedData,RSA-PKCS#1v1.5)。

两个子模块均致力于符合 PDF 规范(ISO 32000-1 / ISO 32000-2)。

Re-exports§

pub use encrypt::EncryptionInfo;
pub use encrypt::PdfEncryption;
pub use encrypt::PdfEncryptionAlgorithm;
pub use encrypt::PdfPermissions;
pub use encrypt::decrypt_pdf;
pub use encrypt::encrypt_pdf;
pub use encrypt::get_encryption_info;
pub use sign::PdfSigner;
pub use sign::SignatureInfo;
pub use sign::sign_pdf;
pub use sign::verify_pdf_signature;

Modules§

encrypt
PDF 加密与解密(ISO 32000-1 第 7.6 节及 ISO 32000-2)。
sign
PDF 数字签名(ISO 32000-1 第 12.8 节,RFC 5652)。

Enums§

CryptoError
PDF 文档加密操作特有的错误。