Discuss this help topic in SecureBlackbox Forum

TElDKRSAPublicKey.Generate

TElDKRSAPublicKey     See also     


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


Generates new key when new DNS-record is created.

Declaration

[C#]
    byte[] Generate(int Bits);

[VB.NET]
    Function Generate(ByVal Bits As Integer) As Byte()

[Pascal]
    function Generate(Bits: Integer; PrivateKey: Pointer; var PrivateKeySize: Integer): Boolean;

[C++]
    void Generate(int32_t Bits, std::vector<uint8_t> &OutResult);

[PHP]
    string Generate(integer $Bits)

[Java]
    byte[] generate(int Bits);

Parameters

  • Bits - necessary key length in bits. Maximum value is 2048.
  • PrivateKey - points to the memory area where the newly corresponding private key must be written.
  • PrivateKeySize - size of the memory area to which PrivateKey parameter points. This parameter returns actual size of the private key in bytes.

Return value

     True if the key has been generated successfully.
     False otherwise.

Description

    Use this method when you need to generate public key during new DNS-record creating.
    If PrivateKey parameter is nil or PrivateKeySize value is not enough for private key the method will set PrivateKeySize to necessary memory size and return False.
     Note, the Bits maximum value is 2048 because of DNS-record size limitation. The standard defines the following possible lengths: 512, 768, 1024, 1536 and 2048 bits.

See also:     Load     Save    

Discuss this help topic in SecureBlackbox Forum