pub fn gen_random_pass(len: usize) -> String {
    let charset_len = PASSPHRASE_CHARSET.len();
    let mut rng = ThreadRng::default();
    (0..len)
        .map(|_| -> char {
            let i = rng.gen_range(0, charset_len);
            PASSPHRASE_CHARSET.as_bytes()[i].into()
        })
        .collect()
}
// This function is for test only,
// not providing any security protection.
This function is for test only,
not providing any security protection.
This function is for test only not providing any security protection .
pub fn gen_random_pass(len: usize) -> String {
    let charset_len = PASSPHRASE_CHARSET.len();
    let mut rng = ThreadRng::default();
    (0..len)
        .map(|_| -> char {
            let i = rng.gen_range(0, charset_len);
            PASSPHRASE_CHARSET.as_bytes()[i].into()
        })
        .collect()
}
pub fn gen_random_pass ( len : usize ) -> String { let charset_len = PASSPHRASE_CHARSET . len ( ) ; let mut rng = ThreadRng :: default ( ) ; ( 0 .. len ) . map ( | _ | -> char { let i = rng . gen_range ( 0 , charset_len ) ; PASSPHRASE_CHARSET . as_bytes ( ) [ i ] . into ( ) } ) . collect ( ) }
This function is for test only,
not providing any security protection.
This function is for test only not providing any security protection .
len
usize
len
usize