SetPAdESSignatureTimeStampDigestAlgorithm

Security and Signatures

Requires the Enterprise edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibEnterprise (unit PDFlibEnterprise); the Enterprise DLL and ActiveX builds provide it unchanged; other editions keep the method, which returns 0, an empty string or False and sets LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)

Description

Selects the digest algorithm used to hash the signer signatureValue before the caller sends it to a TSA

Syntax

Delphi

Function TPDFlib.SetPAdESSignatureTimeStampDigestAlgorithm(STSProcessID, DigestAlgorithm: Integer): Integer; Virtual;

ActiveX

Function PDFlib::SetPAdESSignatureTimeStampDigestAlgorithm(STSProcessID As Long, DigestAlgorithm As Long) As Long

DLL

int DLSetPAdESSignatureTimeStampDigestAlgorithm(int InstanceID, int STSProcessID, int DigestAlgorithm);

Parameters

STSProcessIDValue returned by one of the NewPAdESSignatureTimeStampProcessFrom* functions
DigestAlgorithmDigest code: 0 auto, 1 SHA-1, 2 SHA-256, 3 SHA-384, 4 SHA-512, 5 SHA3-256, 6 SHA3-384, 7 SHA3-512, 8 SM3 (GB/T 32905)

Return values

Returns 1 when the code and process id are accepted; returns 0 otherwise

See also

GetPAdESSignatureValueHashHex