OxL Reference

method x25519.generate

A new random X25519 key pair.

Example:

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

fn main() io, rand {
  print("{x25519.generate().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:700

See also