Back to Devexpress

SignaturePolicy.DigestMethod Property

officefileapi-devexpress-dot-office-dot-digitalsignatures-dot-signaturepolicy.md

latest2.3 KB
Original Source

SignaturePolicy.DigestMethod Property

SECURITY-RELATED CONSIDERATIONS

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

Declaration

csharp
public HashAlgorithmType DigestMethod { get; set; }
vb
Public Property DigestMethod As HashAlgorithmType

Property Value

TypeDescription
HashAlgorithmType

An enumeration value that indicates the digest method.

|

Available values:

NameDescription
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.

|

Example

The following code snippet defines the signature policy:

csharp
SignatureInfo signatureInfo = new SignatureInfo();
SignaturePolicy policy = signatureInfo.Policy;
policy.IsImplied = false;
policy.Identifier = "https://...";
policy.DigestMethod = HashAlgorithmType.SHA384;
vb
Dim signatureInfo As New SignatureInfo()
Dim policy As SignaturePolicy = signatureInfo.Policy
policy.IsImplied = False
policy.Identifier = "https://..."
policy.DigestMethod = HashAlgorithmType.SHA384

See Also

SignaturePolicy Class

SignaturePolicy Members

DevExpress.Office.DigitalSignatures Namespace