Discuss this help topic in SecureBlackbox Forum

TElPGPCustomSecretKey.Generate

TElPGPCustomSecretKey     See also     


Filter: C#/Java  VB.NET  Pascal  C++  PHP  


Generates new key pair.

Declaration

[C#/Java]
    void Generate(string Password, int Bits, int Algorithm, bool UseOldFormat, int Expires);

[VB.NET]
    Sub Generate(ByVal Password As String, ByVal Bits As Integer, ByVal Algorithm As Integer, ByVal UseOldFormat As Boolean, ByVal Expires As Integer)

[Pascal]
    procedure Generate(Password : string; Bits : integer; Algorithm : TSBPGPPublicKeyAlgorithm; UseOldFormat : boolean = true; Expires : integer = 0);
    TSBPGPPublicKeyAlgorithm=integer;

[C++]
    void Generate(const std::string &Password, int32_t Bits, int32_t Algorithm, bool UseOldFormat, int32_t Expires);

[PHP]
    void Generate(string $Password, integer $Bits, integer $Algorithm, bool $UseOldFormat, integer $Expires)

Parameters

  • Password - Password to protect the new key.
  • Bits - key length in bits. For ECDSA/ECDH algorithms, the elliptic curve is chosen and set according to the Bits parameter. The elliptic curve is specified by the Curve property.
  • Algorithm - encryption algorithm.
  • UseOldFormat - use old (PGP 2.x) or new format for the key.
  • Expires - time in days when the key expires. 0 - no expiration.

Values


Description

    Use this method to generate new key pair.

    This method returns when generation is complete. To generate a keypair asynchronously, use BeginGenerate and EndGenerate methods.

See also:     BeginGenerate     ChangePassphrase     Curve     EncryptionAlgorithm     EndGenerate    

Discuss this help topic in SecureBlackbox Forum