Skip to main content

secure_random_string

Function secure_random_string 

Source
pub fn secure_random_string(length: usize) -> String
Expand description

Generate secure random string for testing.

§Example

let s = test_data::secure_random_string(16);
assert_eq!(s.len(), 32); // hex-encoded, so 2x input length