THPDFPDFMACOptions 记录

选择添加或验证 PDF 消息认证码时使用的 PDF MAC 策略配置、摘要算法、允许的摘要集合和 AES-GCM 要求

声明

THPDFPDFMACOptions= record
  Profile: THPDFPDFMACPolicyProfile;
  DigestAlgorithm: THPDFPDFMACDigestAlgorithm;
  AllowedDigestAlgorithms: THPDFPDFMACDigestAlgorithms;
  RequireAESGCM: boolean;
  class function Compatibility: THPDFPDFMACOptions; static;
  class function Modern: THPDFPDFMACOptions; static;
  class function HighAssurance: THPDFPDFMACOptions; static;
  class function Default: THPDFPDFMACOptions; static;
end;

单元

HPDFDoc

字段

字段用途
Profile随 MAC 记录的 THPDFPDFMACPolicyProfile 标签:pmppCompatibility、pmppModern、pmppHighAssurance 或 pmppCustom
DigestAlgorithm创建 MAC 时用来派生密钥并计算 MAC 的摘要;策略配置固定唯一摘要时,也就是验证时的期望摘要
AllowedDigestAlgorithms验证时接受的摘要集合,为旧文档提供算法灵活性
RequireAESGCM为 true 时,验证坚持要求 MAC 负载受 AES-GCM 保护
Compatibility类工厂:主摘要 SHA-256,允许 SHA-2 与 SHA-3 集合,不要求 AES-GCM
Modern类工厂:主摘要 SHA-384,允许 SHA-384/SHA-512/SHA-3 集合,不要求 AES-GCM
HighAssurance类工厂:仅 SHA3-512,要求 AES-GCM
Default返回 Compatibility 的类工厂

使用说明

相关 API