pub fn random_grease_value(rand: &impl OpenMlsRand) -> u16Available on 32-bit or 64-bit only.
Expand description
Returns a random GREASE value from the set of valid GREASE values.
This function uses the provided random number generator to select one of the 15 valid GREASE values defined in RFC 9420.
§Arguments
rand- A random number generator implementingOpenMlsRand
§Returns
A randomly selected GREASE value
§Examples
use openmls::grease::random_grease_value;
use openmls_rust_crypto::RustCrypto;
let crypto = RustCrypto::default();
let grease = random_grease_value(&crypto);
assert!(openmls::grease::is_grease_value(grease));