procedure Generate(const Algorithm: TScAsymmetricAlgorithm; const BitCount: integer; Random: TScRandom = nil);

 

Description

Generates a new RSA or DSA key, and if the KeyName and KeyList parameters are specified, automatically saves it. If the key is created successfully, the Ready property is set to True.

Random data generated by the specified random number generator is used for generating keys. If Random is nil, the default random number generator is used.

The Algorithm parameter can be set only to the aaRSA or aaDSA values. To generate an Elliptic Curve cryptography key, you should call the GenerateEC method.

 

Parameters:

Algorithm - asymmetric algorithm that determines a type of the key to be generated.
BitCount - key length in bits.
Random - pointer to the random number generator that is used for getting random data.

 

Note: The key length specified in the BitCount parameter determines the resistance to breaking. Now for usual tasks the recommended key length is 2048 bits, for crucial tasks - 4096 bits.

 

See also

GenerateEC

ImportFrom

 

SecureBridge Components, Copyright © 2007-2021 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support