Imports Private key into a custom OpenPGP key store. If the key store does not exit, it is created.
Namespace:
DidiSoft
Assembly:
PGPLib (in PGPLib.dll) Version: 1.6.3.19546
Syntax
| C# |
|---|
public void ImportPrivateKey(
string privateKeyFileName,
string password
) |
| Visual Basic (Declaration) |
|---|
Public Sub ImportPrivateKey ( _
privateKeyFileName As String, _
password As String _
) |
| Visual C++ |
|---|
public:
void ImportPrivateKey(
String^ privateKeyFileName,
String^ password
) |
Parameters
- privateKeyFileName
- Type: System..::.String
File of the Private key to be imported (absolute or relative path)
- password
- Type: System..::.String
Password of the private key
Examples
CopyC#
using System;
using DidiSoft;
public class ImportPrivateKey
{
public static void Demo()
{
KeyStore keyStore = new KeyStore(@"DataFiles\key.store", "changeit");
keyStore.ImportPrivateKey(@"DataFiles\private.key", "changeit");
}
}
CopyVB.NET
Imports System
Imports DidiSoft
Public Class ImportPrivateKey
Public Shared Sub Demo()
Dim keyStore As New KeyStore("DataFiles\key.store", "changeit")
keyStore.ImportPrivateKey("DataFiles\private.key", "changeit")
End Sub
End Class
See Also