DigitalSignatureFieldSignDigest Method (Byte, String, 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,
string in_pkcs12_keyfile_path,
string in_keyfile_password,
bool in_pades_mode,
DigestAlgorithm in_digest_algorithm_type
)
Public Shared Function SignDigest (
in_digest As Byte(),
in_pkcs12_keyfile_path As String,
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] String^ in_pkcs12_keyfile_path,
[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_keyfile_path, in_keyfile_password, in_pades_mode, in_digest_algorithm_type);
Parameters
- in_digest
- Type: SystemByte
the digest value to use - in_pkcs12_keyfile_path
- Type: SystemString
the path to the PKCS #12 key file (usually has a .pfx extension) to use for signing - in_keyfile_password
- Type: SystemString
the password to use to decrypt the PKCS #12 key file - 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