OpenPgpContextDigestAlgorithmRank Property

Get or set the preferred rank order for the digest algorithms; from the most preferred to the least.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected DigestAlgorithm[] DigestAlgorithmRank { get; set; }

Property Value

DigestAlgorithm
The preferred digest algorithm ranking.

Remarks

Gets or sets the preferred rank order for the digest algorithms; from the most preferred to the least.

The digest algorithm ranking, filtered by which digest algorithms are enabled (see EnabledDigestAlgorithms), is only used when generating new key pairs (see GenerateKeyPair(MailboxAddress, String, NullableDateTime, EncryptionAlgorithm, SecureRandom)). It is stored in the key's "preferred hash algorithms" signature subpacket, which advertises to other OpenPGP implementations which digest algorithms the owner of the key prefers.

It does not affect signing, where the caller always specifies the digest algorithm, nor signature verification, where the digest algorithm chosen by the signer is used.

GnuPGContext initializes the ranking from the personal-digest-preferences option in gpg.conf, if present.

Exceptions

ArgumentNullException value is .
ArgumentException value is empty.

See Also