standard.lib.cripto.rsa_generate_keys

rsa_generate_keys is available since version 1.0.

Prototype:

boolean rsa_generate_keys(number bits, var string rsa_private_key, var string rsa_public_key)

Parameters

bits
[in] the number of bits (eg: 256(min), 512, 1024, 2048(max), must be a multiple of 256)
rsa_private_key
[out] the private key
rsa_public_key
[out] the public key

Description:

Generates a RSA key pair.

Notice: This keys are NOT to be considered strong keys.

Return value:

Returns true if succeeded, or false if failed.