Generates OpenPGP Key pair with RSA encryption and predefined values for compression, hashing and cypher
like the ones generated with PGP Desktop(tm) wizard.
Namespace:
DidiSoft
Assembly:
PGPLib (in PGPLib.dll) Version: 1.6.3.19546
Syntax
| C# |
|---|
public virtual void GenerateKeyPair(
int keySize,
string userId,
string password
) |
| Visual Basic (Declaration) |
|---|
Public Overridable Sub GenerateKeyPair ( _
keySize As Integer, _
userId As String, _
password As String _
) |
| Visual C++ |
|---|
public:
virtual void GenerateKeyPair(
int keySize,
String^ userId,
String^ password
) |
Remarks
Examples
CopyC#
using System;
using DidiSoft;
public class GenerateKeyPair
{
public void Demo()
{
KeyStore ks = new KeyStore(@"DataFiles\key.store", "changeit");
ks.GenerateKeyPair(1024, "demo@didisoft.com", "changeit");
}
}
CopyVB.NET
Imports System
Imports DidiSoft
Public Class GenerateKeyPair
Public Sub Test()
Dim ks As New KeyStore("DataFiles\key.store", "changeit")
ks.GenerateKeyPair(1024, "demo@didisoft.com", "changeit")
End Sub
End Class
Exceptions
| Exception | Condition |
|---|
| PgpException |
|
See Also