Exports a key ring (the public and private key combined) located in this key store in one file.

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

Syntax

C#
public virtual void ExportKeyRing(
	string fileName,
	long keyId,
	bool asciiArmored
)
Visual Basic
Public Overridable Sub ExportKeyRing ( _
	fileName As String, _
	keyId As Long, _
	asciiArmored As Boolean _
)
Visual C++
public:
virtual void ExportKeyRing(
	String^ fileName, 
	long long keyId, 
	bool asciiArmored
)

Parameters

fileName
Type: System..::..String
File name where the key ring will be exported (absolute or relative path)
keyId
Type: System..::..Int64
Key Id of the keyring to be exported
asciiArmored
Type: System..::..Boolean
if true the output is ASCII armored, when false it is binary

Remarks

The private key is exported only if exists.

Exceptions

ExceptionCondition
DidiSoft.Pgp.Exceptions..::..WrongPublicKeyExceptionIf there is no such key
System.IO..::..IOExceptionIf file writing error occur

See Also