OpenPgpContextGetDigestAlgorithm(HashAlgorithmTag) Method

Gets the equivalent DigestAlgorithm for the specified HashAlgorithmTag.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static DigestAlgorithm GetDigestAlgorithm(
	HashAlgorithmTag hashAlgorithm
)

Parameters

hashAlgorithm  HashAlgorithmTag
The hash algorithm.

Return Value

DigestAlgorithm
The digest algorithm.

Remarks

Gets the equivalent DigestAlgorithm for the specified HashAlgorithmTag.

Exceptions

ArgumentOutOfRangeException hashAlgorithm is out of range.
NotSupportedException hashAlgorithm does not have an equivalent DigestAlgorithm value.

See Also