Class DigestAlgorithm
Inheritance
Inherited Members
Namespace: pdftron.Crypto
Assembly: PDFNetAndroid.dll
Syntax
public static class DigestAlgorithm
Methods
CalculateDigest(DigestAlgorithm.Type, Byte[])
Declaration
public static byte[] CalculateDigest(DigestAlgorithm.Type in_digest_algorithm_type, byte[] in_message_buf)
Parameters
Type | Name | Description |
---|---|---|
DigestAlgorithm.Type | in_digest_algorithm_type | |
System.Byte[] | in_message_buf |
Returns
Type | Description |
---|---|
System.Byte[] |
SignDigest(Byte[], DigestAlgorithm.Type, Byte[], String)
Sign the digest of arbitrary data with private key in the provided PKCS #12 key file (.pfx). This function is part of the low-level custom signing API, and works with GenerateESSSigningCertPAdESAttribute, GenerateCMSSignedAttributes, and GenerateCMSSignature.
Declaration
public static byte[] SignDigest(byte[] digest_buf, DigestAlgorithm.Type digest_algorithm_type, byte[] pkcs12_buf, string pkcs12_password)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | digest_buf | The digest to sign |
DigestAlgorithm.Type | digest_algorithm_type | The digest algorithm used to generate the digest |
System.Byte[] | pkcs12_buf | The buffer containing the PKCS #12 key (as usually stored in .pfx files) to use for signing |
System.String | pkcs12_password | The password to use to parse the PKCS 12 key |
Returns
Type | Description |
---|---|
System.Byte[] | the DER-serialized bytes of the signature |
SignDigest(Byte[], DigestAlgorithm.Type, String, String)
Sign the digest of arbitrary data with private key in the provided PKCS #12 key file (.pfx). This function is part of the low-level custom signing API, and works with GenerateESSSigningCertPAdESAttribute, GenerateCMSSignedAttributes, and GenerateCMSSignature.
Declaration
public static byte[] SignDigest(byte[] digest_buf, DigestAlgorithm.Type digest_algorithm_type, string pkcs12_keyfile_path, string pkcs12_password)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | digest_buf | The digest to sign |
DigestAlgorithm.Type | digest_algorithm_type | The digest algorithm used to generate the digest |
System.String | pkcs12_keyfile_path | The path to the PKCS #12 keyfile (usually has a .pfx extension) to use for signing |
System.String | pkcs12_password | The password to use to parse the PKCS #12 keyfile |
Returns
Type | Description |
---|---|
System.Byte[] | the DER-serialized bytes of the signature |