Open Pgp 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.
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)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 |
|---|---|
| MD5 | pgp-md5 |
| Sha1 | pgp-sha1 |
| RipeMD160 | pgp-ripemd160 |
| MD2 | pgp-md2 |
| Tiger192 | pgp-tiger192 |
| Haval5160 | pgp-haval-5-160 |
| Sha256 | pgp-sha256 |
| Sha384 | pgp-sha384 |
| Sha512 | pgp-sha512 |
| Sha224 | pgp-sha224 |
Exceptions
| ArgumentOutOfRangeException | micalg is out of range. |