HPDFCMSBuildSignedDataWithProvider

Builds detached CMS SignedData whilst keeping private-key operations inside a caller-selected signature provider

Declaration

function HPDFCMSBuildSignedDataWithProvider(const CertificateDER,
  DocDigest: TBytes; Provider: THPDFSignatureProvider;
  const KeyIdentifier: AnsiString;
  const Options: THPDFCMSSignOptions): TBytes;

DocDigest must match the size selected by Options.DigestAlgorithm and Provider must advertise spcSign

The request input is the selected digest of the DER signed-attribute set and includes digest and signature OIDs, the selected RSA or ECDSA scheme, PSS salt length, certificate, key identifier and a unique operation identifier