Function generate [src]

Generate a new, random key pair. crypto.random.bytes must be supported by the target.

Prototype

pub fn generate() KeyPair

Source

pub fn generate() KeyPair { var random_seed: [seed_length]u8 = undefined; while (true) { crypto.random.bytes(&random_seed); return generateDeterministic(random_seed) catch { @branchHint(.unlikely); continue; }; } }