OpenPgpContextGetHashAlgorithm Method

Gets the equivalent HashAlgorithmTag for the specified DigestAlgorithm.

Definition

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

Parameters

digestAlgo  DigestAlgorithm
The digest algorithm.

Return Value

HashAlgorithmTag
The hash algorithm.

Remarks

Maps a DigestAlgorithm to the equivalent HashAlgorithmTag.

Exceptions

ArgumentOutOfRangeException digestAlgo is out of range.
NotSupportedException digestAlgo is not a supported digest algorithm.

See Also