pub fn generate_key(length: usize) -> Result<Vec<u8>>Expand description
Returns a random key of the specified length. Can also be used whenever you need a random byte array, like for a salt.
§Arguments
length- Length of the desired key.
§Example
use devolutions_crypto::utils::generate_key;
let key = generate_key(32).expect("generate key shouldn't fail");;
assert_eq!(32, key.len());