Exports Key ring (both public and private key) 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
)
Visual Basic
Public Overridable Sub ExportKeyRing ( _
	fileName As String, _
	keyId As Long _
)
Visual C++
public:
virtual void ExportKeyRing(
	String^ fileName, 
	long long keyId
)

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 Public Key

Remarks

The result file is in ASCII armored format. 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