Do I need to say more?
Last active
October 13, 2020 18:59
-
-
Save 10maurycy10/112a68e0150e7810dbf35828cee64ebc to your computer and use it in GitHub Desktop.
virtual key smash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "virtual-key-smash" | |
version = "0.1.0" | |
authors = ["10maurycy10 <10maurycy10@users.noreply.github.com>"] | |
edition = "2018" | |
[dependencies] | |
rand = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//put at ./src/main.rs | |
use rand::{thread_rng, Rng}; | |
use rand::distributions::Alphanumeric; | |
fn random_string(n: usize) -> String { | |
thread_rng().sample_iter(&Alphanumeric) | |
.take(n) | |
.collect() | |
} | |
fn main() { | |
println!("{}", random_string(2048)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment