Discuss this help topic in SecureBlackbox Forum


TElPGPCustomSecretKey     See also     

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

Generates new key pair.


    void Generate(string Password, int Bits, int Algorithm, bool UseOldFormat, int Expires);

    Sub Generate(ByVal Password As String, ByVal Bits As Integer, ByVal Algorithm As Integer, ByVal UseOldFormat As Boolean, ByVal Expires As Integer)

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

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

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

    void generate(String Password, int Bits, int Algorithm, boolean UseOldFormat, int Expires);


  • 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.



    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