OxL Справочник OxL
РусскийEnglish

data KeyPair

A key pair; the private half is a secret<bytes> (never shown or logged, wiped when dropped).

Example:

oxl✓ проверяется в CI
use std.crypto { ed25519 }

fn main() io, rand {
  let kp = ed25519.generate()
  print("{kp.publicKey.len()} {kp.secretKey}")
}
Вывод
32 ***
pub(api) data KeyPair

Потокобезопасность. the private half is a `secret<bytes>`: never shown or logged, wiped when dropped.

С версии. 1.0.0-beta

Поля

pub(api) secretKey: secret<bytes>

The private key; never shown or logged, wiped when dropped.

pub(api) publicKey: bytes

The public key (32 bytes).

Определено в: std/crypto/crypto.oxl:549

См. также