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 when the profile pins exactly one |
AllowedDigestAlgorithms | Set of digests accepted during validation, enabling algorithm agility for older documents |
RequireAESGCM | When true, validation insists the MAC payload is AES-GCM protected |
Compatibility | Class factory: SHA-256 primary, SHA-2 and SHA-3 set allowed, AES-GCM not required |
Modern | Class factory: SHA-384 primary, SHA-384/SHA-512/SHA-3 set allowed, AES-GCM not required |
HighAssurance | Class factory: SHA3-512 only and AES-GCM required |
Default | Class factory returning Compatibility |
Usage notes
- Pick one of the four class factories instead of assembling the record by hand; only a custom profile requires 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 to enforce a policy while checking one - Use
Compatibilityfor documents that must verify across older toolchains, andHighAssurancewhere post-quantum-ready SHA-3 and authenticated encryption are mandated