Secure Mime ContextGet Digest Algorithm Name Method
Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The micalg value.
ICryptographyContextGetDigestAlgorithmName(DigestAlgorithm)
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override string GetDigestAlgorithmName(
DigestAlgorithm micalg
)Parameters
- micalg DigestAlgorithm
- The digest algorithm.
Return Value
StringThe micalg value.
Implements
ICryptographyContextGetDigestAlgorithmName(DigestAlgorithm)ICryptographyContextGetDigestAlgorithmName(DigestAlgorithm)
Remarks
Maps the DigestAlgorithm to the appropriate string identifier as used by the micalg parameter value of a multipart/signed Content-Type header. For example:
| Algorithm | Name |
|---|---|
| MD2 | md2 |
| MD4 | md4 |
| MD5 | md5 |
| Sha1 | sha-1 |
| Sha224 | sha-224 |
| Sha256 | sha-256 |
| Sha384 | sha-384 |
| Sha512 | sha-512 |
| Tiger192 | tiger-192 |
| RipeMD160 | ripemd160 |
| Haval5160 | haval-5-160 |
Exceptions
| ArgumentOutOfRangeException | micalg is out of range. |
| NotSupportedException | The specified DigestAlgorithm is not supported by this context. |