Creates a key revocation certificate for a given OpenPGP key located in a KeyStore and stores it in a file.

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] --output [outputFileName]

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

Syntax

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

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
outputFileName
Type: System..::..String
Output file name where the revocation certificate will be stored (absolute or relative path)

See Also