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
)
Public Shared Function SignDigest (
in_digest As Byte(),
in_pkcs12_buffer As Byte(),
in_keyfile_password As String,
in_pades_mode As Boolean,
in_digest_algorithm_type As DigestAlgorithm
) As Byte()
public:
static array<unsigned char>^ SignDigest(
[InAttribute] array<unsigned char>^ in_digest,
[InAttribute] array<unsigned char>^ in_pkcs12_buffer,
[InAttribute] String^ in_keyfile_password,
[InAttribute] bool in_pades_mode,
[InAttribute] DigestAlgorithm in_digest_algorithm_type
)
pdftron.PDF.DigitalSignatureField.SignDigest = function(in_digest, in_pkcs12_buffer, in_keyfile_password, in_pades_mode, 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:
Bytethe 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