OxL Reference

method ed25519.generate

A new random Ed25519 key pair.

Example:

oxl✓ checked in CI
use std.crypto { ed25519 }

fn main() io, rand {
  let kp = ed25519.generate()
  print("{kp.publicKey.len()}")
}
Output
32
pub(api) static fn generate() -> KeyPair  rand

Complexity. O(1).

Since. 1.0.0-beta

Returns

KeyPair

Effects

rand

Defined in: std/crypto/crypto.oxl:593

See also