Exports the private key part of this key pair into a file.

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

Syntax

C#
public void ExportPrivateKey(
	string fileName,
	bool asciiArmored
)
Visual Basic
Public Sub ExportPrivateKey ( _
	fileName As String, _
	asciiArmored As Boolean _
)
Visual C++
public:
void ExportPrivateKey(
	String^ fileName, 
	bool asciiArmored
)

Parameters

fileName
Type: System..::..String
File name where the public key will be exported (absolute or relative path)
asciiArmored
Type: System..::..Boolean
if true out is ASCII armored, if false binary file format is used.

Exceptions

ExceptionCondition
DidiSoft.Pgp.Exceptions..::..WrongPrivateKeyExceptionIf there is no private key in this key pair
System.IO..::..IOExceptionif an I/O error occurs.

See Also