THPDFPDFMACOptions Record
Selects the PDF MAC policy profile, digest algorithm, allowed digest set and AES-GCM requirement used when adding or validating a PDF message authentication code
Declaration
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;
Unit
HPDFDoc
Fields
| Field | Purpose |
|---|---|
Profile | THPDFPDFMACPolicyProfile label recorded with the MAC: pmppCompatibility, pmppModern, pmppHighAssurance or pmppCustom |
DigestAlgorithm | Digest used to key and compute the MAC when creating one, and the expected digest where the profile pins exactly one |
AllowedDigestAlgorithms | Set of digests accepted during validation, giving algorithm agility for older documents |
RequireAESGCM | When true, validation insists that the MAC payload is AES-GCM protected |
Compatibility | Class factory: SHA-256 primary, SHA-2 and SHA-3 set allowed, AES-GCM not called for |
Modern | Class factory: SHA-384 primary, SHA-384/SHA-512/SHA-3 set allowed, AES-GCM not called for |
HighAssurance | Class factory: SHA3-512 only, with AES-GCM required |
Default | Class factory handing back Compatibility |
Usage notes
- Pick one of the four class factories instead of assembling the record by hand; only a custom profile calls for manual field edits, and validation refuses options that contradict their profile label
- Pass the record to
THotPDF.AddStandalonePDFMACto create a MAC, or toTHotPDF.ValidatePDFMACand the chain/revision validators so as to enforce a policy whilst checking one - Use
Compatibilityfor documents that must verify across older toolchains, andHighAssurancewhere post-quantum-ready SHA-3 and authenticated encryption are a mandated requirement