// Generate random string of length DV_LEN
Generate random string of length DV_LEN
Generate random string of length DV_LEN
pub fn generate_derivation_value() -> String {
    const CHARSET: &[u8] = b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    let mut rng = rand::thread_rng();
    // generate random string
    let derivation_value: String = (0..DV_LEN)
        .map(|_| {
            let idx = rng.gen_range(0, CHARSET.len());
            CHARSET[idx] as char
        })
        .collect();
    derivation_value
}
pub fn generate_derivation_value ( ) -> String { const CHARSET : & [ u8 ] = b" " ; let mut rng = rand :: thread_rng ( ) ; // generate random string let derivation_value : String = ( 0 .. DV_LEN ) . map ( | _ | { let idx = rng . gen_range ( 0 , CHARSET . len ( ) ) ; CHARSET [ idx ] as char } ) . collect ( ) ; derivation_value }
Generate random string of length DV_LEN
Generate random string of length DV_LEN