ruc 10.0.0

Rust Util Collections
Documentation
1
2
3
4
5
6
7
8
9
10
use ed25519_dalek::{SigningKey, VerifyingKey};
use rand::RngExt;

pub(super) fn create_keypair() -> (SigningKey, VerifyingKey) {
    let mut bytes = [0u8; 32];
    rand::rng().fill(&mut bytes);
    let sk = SigningKey::from_bytes(&bytes);
    let vk = VerifyingKey::from(&sk);
    (sk, vk)
}