pub(crate) fn random(
        ciphersuite: &'static Ciphersuite,
        crypto: &impl OpenMlsCryptoProvider,
        version: impl Into<Option<ProtocolVersion>>,
    ) -> Self {
        let mls_version = version.into().unwrap_or_default();
        log::trace!(
            "Creating a new random secret for {:?} and {:?}",
            ciphersuite.name,
            mls_version
        );
        Secret {
            value: crypto.rand().random_vec(ciphersuite.hash_length()).unwrap(),
            mls_version,
            ciphersuite,
        }
    }
/// Randomly sample a fresh `Secret`.
/// This default random initialiser uses the default Secret length of `hash_length`.
Randomly sample a fresh `Secret`.
This default random initialiser uses the default Secret length of `hash_length`.
Randomly sample a fresh ` Secret ` . This default random initialiser uses the default Secret length of ` hash_length ` .
pub(crate) fn random(
        ciphersuite: &'static Ciphersuite,
        crypto: &impl OpenMlsCryptoProvider,
        version: impl Into<Option<ProtocolVersion>>,
    ) -> Self {
        let mls_version = version.into().unwrap_or_default();
        log::trace!(
            "Creating a new random secret for {:?} and {:?}",
            ciphersuite.name,
            mls_version
        );
        Secret {
            value: crypto.rand().random_vec(ciphersuite.hash_length()).unwrap(),
            mls_version,
            ciphersuite,
        }
    }
pub ( crate ) fn random ( ciphersuite : & ' static Ciphersuite , crypto : & impl OpenMlsCryptoProvider , version : impl Into < Option < ProtocolVersion > > , ) -> Self { let mls_version = version . into ( ) . unwrap_or_default ( ) ; log :: trace ! ( " " ciphersuite name mls_version ) ; Secret { value : crypto . rand ( ) . random_vec ( ciphersuite . hash_length ( ) ) . unwrap ( ) , mls_version , ciphersuite , } }
Randomly sample a fresh `Secret`.
Randomly sample a fresh ` Secret ` .
ciphersuite
&'static Ciphersuite
crypto
&impl OpenMlsCryptoProvider
version
impl Into<Option<ProtocolVersion>>
ciphersuite
&'static Ciphersuite
crypto
&impl OpenMlsCryptoProvider
version
impl Into<Option<ProtocolVersion>>