THotPDF.AddPubKeyRecipient

THotPDF

 

Previous  Methods  CryptKeyLength

Adds one PKCS#7 recipient envelope to a public-key encrypted PDF.

 

Delphi syntax:

procedure AddPubKeyRecipient(const EnvelopeDER: AnsiString);

 

C++ syntax:

void __fastcall AddPubKeyRecipient(System::AnsiString EnvelopeDER);

 

Description

Call AddPubKeyRecipient once for each recipient after EnablePubKeyEncryption. The envelope must be a non-empty PKCS#7 envelopedData DER blob created by the caller with Windows CryptoAPI, OpenSSL, or another certificate toolkit.EnvelopedData recipient envelope

 

The order of recipients is preserved in the PDF /Recipients array and participates in the PDF algorithm 9 file-key derivation.AddPubKeyRecipientCertificate builds an AES-256 envelope directly from an RSA certificate using RSA-OAEP with independently selectable SHA-256, SHA-384, or SHA-512 digest and MGF1 policies

 

AddPubKeyAgreementRecipient accepts an ephemeral originator public key and caller or HSM-derived shared secret for P-256, P-384, P-521, X25519, or X448 recipients, then applies the matching X9.63 KDF and AES-256 key wrap

 

Recipient order is preserved in the PDF /Recipients array and participates in file-key derivation

 

See also: EnablePubKeyEncryption, CryptKeyLength, PDF Filter Support