Hi,
I encourage you to leave feedback and a star, the library is constantly being developed
github: https://github.com/Sworzen1/securepass
crate: https://crates.io/crates/securepass
I will be very grateful for any interaction.
#Rust lib feedback
9 messages · Page 1 of 1 (latest)
For balance_password, you should either take a mutable string and just mutate, or make a copy and mutate that, but doing both seems a bit confusing
thanks for response I'll check
I would suggest if you want to make the library dependency free you could implement a simple random number generator something like this:
use std::time::{SystemTime, UNIX_EPOCH};
fn main() {
let charset = "some charset string";
let nanos = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().subsec_nanos() as f32;
let index = ((nanos as f32).floor() as usize) % charset.len();
println!("{}", index);
}
Also, Here is the playground link for this I would suggest checking this out as well:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021
A browser interface to the Rust compiler to experiment with the language
please do not give bad advice
Hmmm... What's wrong with this now? No just curious 😅
I mean they have one dependency rand. So they can essentially eliminate it. I mean why have a dependency when you can essentially implement it very easily. Like I don't see a reason to keep it. That's why I made the suggestion 😅 .
System time is a very bad source of randomness. Especially for security purposes.