THotPDF.AddPubKeyAgreementRecipient Method
使用调用方提供或由 HSM 派生的协商材料,构建 CMS KeyAgreeRecipientInfo 信封
声明
procedure AddPubKeyAgreementRecipient(const CertificateDER: array of byte; Permissions: THPDFProtectOptions; Scheme: THPDFPubKeyAgreementScheme; const OriginatorPublicKey, SharedSecret: array of byte);
使用说明
- 支持的方案有 P-256、P-384、P-521、X25519 和 X448
- The certificate algorithm and key size must match
Scheme - The matching X9.63 KDF derives an AES-256 key-encryption key
- 全零的共享密钥会被拒绝,临时的密钥副本会被清除