signinwithethereum 0.8.1

Rust implementation of EIP-4361: Sign In With Ethereum
1
2
3
4
5
6
7
8
9
10
11
use rand::distr::Alphanumeric;
use rand::{rng, RngExt};

/// Generates a secure nonce.
pub fn generate_nonce() -> String {
    rng()
        .sample_iter(&Alphanumeric)
        .take(17)
        .map(char::from)
        .collect()
}