Issue tokens to initialize VNC connections

This commit is contained in:
2023-10-18 12:27:50 +02:00
parent 3042bbdac6
commit 4f75cd918d
10 changed files with 173 additions and 2 deletions

View File

@ -0,0 +1,12 @@
use rand::distributions::Alphanumeric;
use rand::Rng;
/// Generate a random string
pub fn rand_str(len: usize) -> String {
let s: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(len)
.map(char::from)
.collect();
s
}