pub(crate) fn welcome(
        &self,
        backend: &impl OpenMlsCryptoProvider,
    ) -> Result<WelcomeSecret, KeyScheduleError> {
        if self.state != State::Initial || self.intermediate_secret.is_none() {
            log::error!("Trying to derive a welcome secret while not in the initial state.");
            return Err(KeyScheduleError::InvalidState(ErrorState::NotInit));
        }

        Ok(WelcomeSecret::new(
            backend,
            self.intermediate_secret.as_ref().unwrap(),
        ))
    }
/// Derive the welcome secret.
/// Note that this has to be called before the context is added.
Derive the welcome secret.
Note that this has to be called before the context is added.
Derive the welcome secret . Note that this has to be called before the context is added .
pub(crate) fn welcome(
        &self,
        backend: &impl OpenMlsCryptoProvider,
    ) -> Result<WelcomeSecret, KeyScheduleError> {
        if self.state != State::Initial || self.intermediate_secret.is_none() {
            log::error!("Trying to derive a welcome secret while not in the initial state.");
            return Err(KeyScheduleError::InvalidState(ErrorState::NotInit));
        }
        Ok(WelcomeSecret::new(
            backend,
            self.intermediate_secret.as_ref().unwrap(),
        ))
    }
pub ( crate ) fn welcome ( & self , backend : & impl OpenMlsCryptoProvider , ) -> Result < WelcomeSecret , KeyScheduleError > { if self . state != State :: Initial || self . intermediate_secret . is_none ( ) { log :: error ! ( " " ) ; return Err ( KeyScheduleError :: InvalidState ( ErrorState :: NotInit ) ) ; } Ok ( WelcomeSecret :: new ( backend , self . intermediate_secret . as_ref ( ) . unwrap ( ) , ) ) }
Derive the welcome secret.
Derive the welcome secret .
&self
backend
&impl OpenMlsCryptoProvider
&self
backend
&impl OpenMlsCryptoProvider