pub(crate) fn derive_exported_secret(
        &self,
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        label: &str,
        context: &[u8],
        key_length: usize,
    ) -> Vec<u8> {
        let context_hash = &ciphersuite.hash(backend, context);
        // FIXME: remove unwraps
        self.secret
            .derive_secret(backend, label)
            .unwrap()
            .kdf_expand_label(backend, label, context_hash, key_length)
            .unwrap()
            .as_slice()
            .to_vec()
    }
/// Derive a `Secret` from the exporter secret. We return `Vec<u8>` here, so
/// it can be used outside of OpenMLS. This function is made available for
/// use from the outside through [`crate::group::mls_group::export_secret`].
Derive a `Secret` from the exporter secret. We return `Vec` here, so
it can be used outside of OpenMLS.
Derive a ` Secret ` from the exporter secret . We return ` Vec ` here so it can be used outside of OpenMLS .
pub(crate) fn derive_exported_secret(
        &self,
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        label: &str,
        context: &[u8],
        key_length: usize,
    ) -> Vec<u8> {
        let context_hash = &ciphersuite.hash(backend, context);
        // FIXME: remove unwraps
        self.secret
            .derive_secret(backend, label)
            .unwrap()
            .kdf_expand_label(backend, label, context_hash, key_length)
            .unwrap()
            .as_slice()
            .to_vec()
    }
pub ( crate ) fn derive_exported_secret ( & self , ciphersuite : & Ciphersuite , backend : & impl OpenMlsCryptoProvider , label : & str , context : & [ u8 ] , key_length : usize , ) -> Vec < u8 > { let context_hash = & ciphersuite . hash ( backend , context ) ; // FIXME: remove unwraps self . secret . derive_secret ( backend , label ) . unwrap ( ) . kdf_expand_label ( backend , label , context_hash , key_length ) . unwrap ( ) . as_slice ( ) . to_vec ( ) }
Derive a `Secret` from the exporter secret.
Derive a ` Secret ` from the exporter secret .
&self
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
label
&str
context
&[u8]
key_length
usize
&self
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
label
&str
context
&[u8]
key_length
usize