pub(crate) fn new(backend: &impl OpenMlsCryptoProvider, kpb: KeyPackageBundle) -> RatchetTree {
        // Create an initial, empty tree
        let mut tree = Self {
            ciphersuite: kpb.key_package().ciphersuite(),
            mls_version: kpb.key_package().protocol_version(),
            nodes: Vec::new(),
            private_tree: PrivateTree::new(0usize.into()),
        };
        // Add our own node
        let (index, _credential) = tree.add_node(kpb.key_package());
        tree.private_tree = PrivateTree::from_leaf_secret(backend, index, kpb.leaf_secret());
        tree
    }
/// Create a new `RatchetTree` with only the "self" member as first node.
Create a new `RatchetTree` with only the "self" member as first node.
Create a new ` RatchetTree ` with only the " self " member as first node .
pub(crate) fn new(backend: &impl OpenMlsCryptoProvider, kpb: KeyPackageBundle) -> RatchetTree {
        // Create an initial, empty tree
        let mut tree = Self {
            ciphersuite: kpb.key_package().ciphersuite(),
            mls_version: kpb.key_package().protocol_version(),
            nodes: Vec::new(),
            private_tree: PrivateTree::new(0usize.into()),
        };
        // Add our own node
        let (index, _credential) = tree.add_node(kpb.key_package());
        tree.private_tree = PrivateTree::from_leaf_secret(backend, index, kpb.leaf_secret());
        tree
    }
pub ( crate ) fn new ( backend : & impl OpenMlsCryptoProvider , kpb : KeyPackageBundle ) -> RatchetTree { // Create an initial, empty tree let mut tree = Self { ciphersuite : kpb . key_package ( ) . ciphersuite ( ) , mls_version : kpb . key_package ( ) . protocol_version ( ) , nodes : Vec :: new ( ) , private_tree : PrivateTree :: new ( 0usize . into ( ) ) , } ; // Add our own node let ( index , _credential ) = tree . add_node ( kpb . key_package ( ) ) ; tree . private_tree = PrivateTree :: from_leaf_secret ( backend , index , kpb . leaf_secret ( ) ) ; tree }
Create a new `RatchetTree` with only the "self" member as first node.
Create a new ` RatchetTree ` with only the " self " member as first node .
backend
&impl OpenMlsCryptoProvider
kpb
KeyPackageBundle
backend
&impl OpenMlsCryptoProvider
kpb
KeyPackageBundle