officefileapi-devexpress-dot-office-dot-digitalsignatures-dot-signaturepolicy.md
Using weak or outdated hash algorithms (such as SHA-1) may allow threat actors to manipulate or predict hash values. Use modern, secure alternatives (such as SHA-256 or stronger).
Gets or sets the signature digest method (the algorithm used to hash the policy).
Namespace : DevExpress.Office.DigitalSignatures
Assembly : DevExpress.Docs.v25.2.dll
NuGet Package : DevExpress.Document.Processor
public HashAlgorithmType DigestMethod { get; set; }
Public Property DigestMethod As HashAlgorithmType
| Type | Description |
|---|---|
| HashAlgorithmType |
An enumeration value that indicates the digest method.
|
Available values:
| Name | Description |
|---|---|
| SHA1 |
SHA1 hashing algorithm. This type can affect the signature’s integrity, authenticity, and legal validity.
| | SHA256 |
SHA256 hashing algorithm.
| | SHA384 |
SHA384 hashing algorithm.
| | SHA512 |
SHA512 hashing algorithm.
|
The following code snippet defines the signature policy:
SignatureInfo signatureInfo = new SignatureInfo();
SignaturePolicy policy = signatureInfo.Policy;
policy.IsImplied = false;
policy.Identifier = "https://...";
policy.DigestMethod = HashAlgorithmType.SHA384;
Dim signatureInfo As New SignatureInfo()
Dim policy As SignaturePolicy = signatureInfo.Policy
policy.IsImplied = False
policy.Identifier = "https://..."
policy.DigestMethod = HashAlgorithmType.SHA384
See Also