Discuss this help topic in SecureBlackbox Forum


TElDKRSAPublicKey     See also     

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

Generates new key when new DNS-record is created.


    byte[] Generate(int Bits);

    Function Generate(ByVal Bits As Integer) As Byte()

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

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

    string Generate(integer $Bits)


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


    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