data KeyPair
A key pair; the private half is a secret<bytes> (never shown or logged, wiped when dropped).
Example:
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