Skip to main content

Module key

Module key 

Source
Available on crate feature crypto only.
Expand description

Private key generation (RSA / ed25519 via OpenSSL). Private key generation (RSA / ed25519 via OpenSSL).

Feature crypto only. Rhai bindings are registered by key_rhai_register.

Constants§

DEFAULT_RSA_BITS
Default RSA key size when bits is not specified.

Functions§

gen_private_key
Generate a PEM-encoded private key. algo is rsa or ed25519 (case-insensitive). bits is only used for RSA. Returns Error::UnsupportedKeyAlgorithm for unknown algos.
key_rhai_registerrhai