GenerateRSAkeys()

Generates a secure key (private and public) for use in the encrypt function with the RSA algorithm.

GenerateRSAkeys( key_size=number );

Returns: Struct

Argument Description Default
key_size
number, optional

Number of bits to use for the generated Keys.

1024

Examples

key=generateRSAKeys();
dump(key);

raw="Susi Sorglos f�hnte Ihr Haar"; enc=encrypt(raw,key.private,"rsa"); dec=decrypt(enc,key.public,"rsa"); dump(enc); dump(dec);

enc=encrypt(raw,key.public,"rsa"); dec=decrypt(enc,key.private,"rsa"); dump(enc); dump(dec);

See also