GnuPGContextSignKey Method

Sign a public key.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public void SignKey(
	PgpSecretKey secretKey,
	PgpPublicKey publicKey,
	DigestAlgorithm digestAlgo = DigestAlgorithm.Sha1,
	OpenPgpKeyCertification certification = OpenPgpKeyCertification.GenericCertification
)

Parameters

secretKey  PgpSecretKey
The secret key to use for signing.
publicKey  PgpPublicKey
The public key to sign.
digestAlgo  DigestAlgorithm  (Optional)
The digest algorithm.
certification  OpenPgpKeyCertification  (Optional)
The certification to give the signed key.

Remarks

Signs a public key using the specified secret key.

Most OpenPGP implementations use GenericCertification to make their "key signatures". Some implementations are known to use the other certification types, but few differentiate between them.

Exceptions

ArgumentNullException

secretKey is .

-or-

publicKey is .

See Also