Data.DBXOpenSSL.TRSACypher.GenerateGlobalKey

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class procedure GenerateGlobalKey(keyLength: Integer = RSA_KEY_LENGTH; Exponent: int64 = RSA_KEY_EXPONENT);

C++

__classmethod void __fastcall GenerateGlobalKey(int keyLength = 0x400, __int64 Exponent = 3LL);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DBXOpenSSL.pas
Data.DBXOpenSSL.hpp
Data.DBXOpenSSL TRSACypher

Description

Generates a new global RSA key pair.

GenerateGlobalKey accepts the following parameters:

  • keyLength is the length of the generated key. The default value is the value of the RSA_KEY_LENGTH constant.
  • Exponent is the exponent of the generated key. It must be a prime number. The default value is the value of the RSA_KEY_EXPONENT constant.

Exceptions

GenerateGlobalKey may raise any of the following exceptions:

Class Message Description

TDBXError

SSL module was not loaded or it was not loaded successfully. Use LoadSSL method to load the module

You must successfully load the SSL module using LoadSSL before you call GenerateGlobalKey.

<SSL error message>

An exception may be raised if an error occurs within the underlying HTTPS framework. The error message comes from the framework itself.

See Also