pub(crate) fn init(
        ciphersuite: &'static Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        joiner_secret: JoinerSecret,
        psk: impl Into<Option<PskSecret>>,
    ) -> Self {
        log::debug!(
            "Initializing the key schedule with {:?} ...",
            ciphersuite.name()
        );
        log_crypto!(
            trace,
            "  joiner_secret: {:x?}",
            joiner_secret.secret.as_slice()
        );
        let psk = psk.into();
        log_crypto!(trace, "  {}", if psk.is_some() { "with PSK" } else { "" });
        let intermediate_secret = IntermediateSecret::new(backend, &joiner_secret, psk);
        Self {
            ciphersuite,
            intermediate_secret: Some(intermediate_secret),
            epoch_secret: None,
            state: State::Initial,
        }
    }
/// Initialize the key schedule and return it.
Initialize the key schedule and return it.
Initialize the key schedule and return it .
pub(crate) fn init(
        ciphersuite: &'static Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        joiner_secret: JoinerSecret,
        psk: impl Into<Option<PskSecret>>,
    ) -> Self {
        log::debug!(
            "Initializing the key schedule with {:?} ...",
            ciphersuite.name()
        );
        log_crypto!(
            trace,
            "  joiner_secret: {:x?}",
            joiner_secret.secret.as_slice()
        );
        let psk = psk.into();
        log_crypto!(trace, "  {}", if psk.is_some() { "with PSK" } else { "" });
        let intermediate_secret = IntermediateSecret::new(backend, &joiner_secret, psk);
        Self {
            ciphersuite,
            intermediate_secret: Some(intermediate_secret),
            epoch_secret: None,
            state: State::Initial,
        }
    }
pub ( crate ) fn init ( ciphersuite : & ' static Ciphersuite , backend : & impl OpenMlsCryptoProvider , joiner_secret : JoinerSecret , psk : impl Into < Option < PskSecret > > , ) -> Self { log :: debug ! ( " " ciphersuite name ( ) ) ; log_crypto ! ( trace " " joiner_secret secret as_slice ( ) ) ; let psk = psk . into ( ) ; log_crypto ! ( trace " " if psk is_some ( ) { " " } else { " " } ) ; let intermediate_secret = IntermediateSecret :: new ( backend , & joiner_secret , psk ) ; Self { ciphersuite , intermediate_secret : Some ( intermediate_secret ) , epoch_secret : None , state : State :: Initial , } }
Initialize the key schedule and return it.
Initialize the key schedule and return it .
ciphersuite
&'static Ciphersuite
backend
&impl OpenMlsCryptoProvider
joiner_secret
JoinerSecret
psk
impl Into<Option<PskSecret>>
ciphersuite
&'static Ciphersuite
backend
&impl OpenMlsCryptoProvider
joiner_secret
JoinerSecret
psk
impl Into<Option<PskSecret>>