new DigestAlgorithm()
[Missing documentation]
Members
-
<static> Type
-
Type:
- number
Properties:
Name Type Description e_SHA1
number e_SHA256
number e_SHA384
number e_SHA512
number e_RIPEMD160
number e_unknown_digest_algorithm
number
Methods
-
<static> calculateDigest(in_algorithm, in_buffer)
-
Parameters:
Name Type Description in_algorithm
number PDFNet.DigestAlgorithm.Type = { e_SHA1 : 0 e_SHA256 : 1 e_SHA384 : 2 e_SHA512 : 3 e_RIPEMD160 : 4 e_unknown_digest_algorithm : 5 }
in_buffer
ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray Returns:
A promise that resolves to an object of type: "Uint8Array"- Type
- Promise.<Uint8Array>
-
<static> signDigest(digest_buf, digest_algorithm_type, pkcs12_keyfile_path, pkcs12_password)
-
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.
Parameters:
Name Type Description digest_buf
ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray - The digest to sign. digest_algorithm_type
number PDFNet.DigestAlgorithm.Type = { e_SHA1 : 0 e_SHA256 : 1 e_SHA384 : 2 e_SHA512 : 3 e_RIPEMD160 : 4 e_unknown_digest_algorithm : 5 }
-- The digest algorithm used to generate the digest.pkcs12_keyfile_path
string - The path to the PKCS #12 keyfile (usually has a .pfx extension) to use for signing. pkcs12_password
string - The password to use to parse the PKCS #12 keyfile. Returns:
A promise that resolves to the DER-serialized bytes of the signature.- Type
- Promise.<Uint8Array>
-
<static> signDigestWithKeyfileBuffer(digest_buf, digest_algorithm_type, pkcs12_buf, pkcs12_password)
-
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.
Parameters:
Name Type Description digest_buf
ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray - The digest to sign. digest_algorithm_type
number PDFNet.DigestAlgorithm.Type = { e_SHA1 : 0 e_SHA256 : 1 e_SHA384 : 2 e_SHA512 : 3 e_RIPEMD160 : 4 e_unknown_digest_algorithm : 5 }
-- The digest algorithm used to generate the digest.pkcs12_buf
ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray - The buffer containing the PKCS #12 key (as usually stored in .pfx files) to use for signing. pkcs12_password
string - The password to use to parse the PKCS 12 key. Returns:
A promise that resolves to the DER-serialized bytes of the signature.- Type
- Promise.<Uint8Array>
-
<static> signDigestWithKeyfileFromURL(digest_buf, digest_algorithm_type, pkcs12_keyfile_url, pkcs12_password [, options])
-
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.
Parameters:
Name Type Argument Description digest_buf
ArrayBuffer | Int8Array | Uint8Array | Uint8ClampedArray - The digest to sign. digest_algorithm_type
number PDFNet.DigestAlgorithm.Type = { e_SHA1 : 0 e_SHA256 : 1 e_SHA384 : 2 e_SHA512 : 3 e_RIPEMD160 : 4 e_unknown_digest_algorithm : 5 }
-- The digest algorithm used to generate the digest.pkcs12_keyfile_url
string - The url to the PKCS #12 keyfile (usually has a .pfx extension) to use for signing. pkcs12_password
string - The password to use to parse the PKCS #12 keyfile. options
object <optional>
Additional options to download the keyfile. Returns:
A promise that resolves to the DER-serialized bytes of the signature.- Type
- Promise.<Uint8Array>