Exports private key from this OpenPGP key store into a file.
Namespace: DidiSoft.PgpAssembly: DidiSoft.Pgp (in DidiSoft.Pgp.dll) Version: 1.7.3.35547
Syntax
| C# |
|---|
public virtual void ExportPrivateKey(
string fileName,
string userId,
bool asciiArmored
) |
| Visual Basic |
|---|
Public Overridable Sub ExportPrivateKey ( _
fileName As String, _
userId As String, _
asciiArmored As Boolean _
) |
| Visual C++ |
|---|
public:
virtual void ExportPrivateKey(
String^ fileName,
String^ userId,
bool asciiArmored
) |
Examples
CopyC#
using System;
using DidiSoft.Pgp;
public class ExportKeys
{
public void Demo()
{
KeyStore ks = new KeyStore(@"C:\Test\key.store", "changeit");
bool asciiArmored = true;
ks.ExportPrivateKey(@"C:\Test\private_key_exported.pkr", "support@didisoft.com", asciiArmored);
}
}
CopyVB.NET
Imports System
Imports DidiSoft.Pgp
Public Class ExportKeys
Public Sub Demo()
Dim ks As New KeyStore("C:\Test\key.store", "changeit")
Dim asciiArmored As Boolean = True
ks.ExportPrivateKey("C:\Test\private_key_exported.pkr", "support@didisoft.com", asciiArmored)
End Sub
End Class
Exceptions
See Also