Click or drag to resize

DigitalSignatureFieldSignDigest Method (Byte, Byte, String, Boolean, DigestAlgorithm)

Returns a CMS detached signature incorporating a digest that is provided using the provided PKCS #12 key buffer (.pfx).

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public static byte[] SignDigest(
	byte[] in_digest,
	byte[] in_pkcs12_buffer,
	string in_keyfile_password,
	bool in_pades_mode,
	DigestAlgorithm in_digest_algorithm_type
)

Parameters

in_digest
Type: SystemByte
the digest value to use
in_pkcs12_buffer
Type: SystemByte
a buffer containing the PKCS #12 key (as usually stored in .pfx files) to use for signing
in_keyfile_password
Type: SystemString
the password to use to decrypt the PKCS #12 key file data in the buffer
in_pades_mode
Type: SystemBoolean
whether to create a PAdES-type signature (PDF Advanced Electronic Signatures standards)
in_digest_algorithm_type
Type: pdftron.CryptoDigestAlgorithm
the identifier to use to write the digest algorithm

Return Value

Type: Byte
the DER-serialized bytes of a CMS detached signature (CMS ContentInfo)
Remarks
This function does not change the DigitalSignatureField. Call SaveCustomSignature to write a signature to its PDFDoc.
See Also