1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-23 15:47:45 +00:00
kawari/src/lib.rs

13 lines
282 B
Rust
Raw Normal View History

use rand::distributions::Alphanumeric;
use rand::Rng;
pub mod config;
pub fn generate_sid() -> String {
let random_id: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(56)
.map(char::from)
.collect();
random_id.to_lowercase()
}