Revokes a public key or sub key from a KeyStore.
Note: The corresponding private key of this key must also be in the same KeyStore object.

Equivalent GPG command:
gpg --edit-key [userId]
revkey

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

Syntax

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

Parameters

keyStore
Type: DidiSoft.Pgp..::..KeyStore
KeyStore object containing the key to be revoked
keyId
Type: System..::..Int64
Key ID of the key or sub key to be revoked
privateKeyPassword
Type: System..::..String
private key password of the key to be revoked
reason
Type: System..::..Byte
revocation reason code (use the REASON_ constants in this class)
description
Type: System..::..String
revocation description

See Also