pub fn gen_salt() -> String {
    let rng = SystemRandom::new();
    let mut salt = [0u8; CRE_LEN];
    rng.fill(&mut salt).unwrap();
    unsafe { String::from_utf8_unchecked(salt.to_vec()) }
}
/// Generate password salt
///
/// This function generates **an invalid string** of bytes that is a salt
/// to be used when hashing a password.
/// Do not attempt to parse or otherwise do anything with this string.
Generate password salt
This function generates **an invalid string** of bytes that is a salt
to be used when hashing a password.
Do not attempt to parse or otherwise do anything with this string.
Generate password salt This function generates ** an invalid string ** of bytes that is a salt to be used when hashing a password . Do not attempt to parse or otherwise do anything with this string .
pub fn gen_salt() -> String {
    let rng = SystemRandom::new();
    let mut salt = [0u8; CRE_LEN];
    rng.fill(&mut salt).unwrap();
    unsafe { String::from_utf8_unchecked(salt.to_vec()) }
}
pub fn gen_salt ( ) -> String { let rng = SystemRandom :: new ( ) ; let mut salt = [ 0u8 ; CRE_LEN ] ; rng . fill ( & mut salt ) . unwrap ( ) ; unsafe { String :: from_utf8_unchecked ( salt . to_vec ( ) ) } }
Generate password salt
This function generates **an invalid string** of bytes that is a salt
to be used when hashing a password.
Generate password salt This function generates ** an invalid string ** of bytes that is a salt to be used when hashing a password .