Click or drag to resize
MimeKit

GnuPGContextSignKey Method

Sign a public key.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
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.
Exceptions
ExceptionCondition
ArgumentNullException

secretKey is null.

-or-

publicKey is null.

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.

See Also