Creates a revocation certificate in ASCII armored string format for a given OpenPGP key.

Key revocation certificates are especially useful if we have forgotten the pass phrase to our private key and we need some way to "disable" or revoke that key.

Equivalent GPG command:
gpg --gen-revoke [keyId]

Namespace: DidiSoft.Pgp
Assembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547

Syntax

C#
public string CreateRevocationCertificateText(
	KeyStore keyStore,
	long keyId,
	string privateKeyPassword,
	byte reason,
	string description
)
Visual Basic
Public Function CreateRevocationCertificateText ( _
	keyStore As KeyStore, _
	keyId As Long, _
	privateKeyPassword As String, _
	reason As Byte, _
	description As String _
) As String
Visual C++
public:
String^ CreateRevocationCertificateText(
	KeyStore^ keyStore, 
	long long keyId, 
	String^ privateKeyPassword, 
	unsigned char reason, 
	String^ description
)

Parameters

keyStore
Type: DidiSoft.Pgp..::..KeyStore
KeyStore instance containing the key for which we want to create a revocation certificate
keyId
Type: System..::..Int64
Key ID of the target key
privateKeyPassword
Type: System..::..String
corresponding private key password for this key
reason
Type: System..::..Byte
Revocation reason code (see the REASON constants in this class)
description
Type: System..::..String
Revocation description

Return Value

revocation certificate in ASCII armored string format

See Also