Web3S_Demo > Web 3S Crypto Keygen Function Library > Generate Key (RSA)

Generate Key (RSA)

Generates a new RSA keypair.

Inputs

In
Exec

Key Size
Integer

size of the RSA key

Password
String

password used for private key encryption encoded as UTF8. If left empty, private key will be unencrypted. AES256-CBC cipher is used for key encryption.

Outputs

Out
Exec

Error Message
String

if failed, error message

Public Key (P EM)
Array of Bytes

if successful, raw, PEM-encoded public key data

Private Key (P EM)
Array of Bytes

if successful, raw, PEM-encoded private key data

Success
Boolean

True if generation succeeded, false otherwise