pub(crate) fn new_with_keys(
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        leaf_index: LeafIndex,
        leaf_secret: &Secret,
        path: &[NodeIndex],
    ) -> (Self, Vec<HpkePublicKey>) {
        let mut private_tree = PrivateTree::from_leaf_secret(backend, leaf_index, leaf_secret);

        // Compute path secrets and generate keypairs
        let public_keys =
            private_tree.generate_path_secrets(ciphersuite, backend, leaf_secret, path);

        (private_tree, public_keys)
    }
/// Creates a `PrivateTree` with a new private key, leaf secret and path
/// The private key is derived from the leaf secret.
Creates a `PrivateTree` with a new private key, leaf secret and path
The private key is derived from the leaf secret.
Creates a ` PrivateTree ` with a new private key leaf secret and path The private key is derived from the leaf secret .
pub(crate) fn new_with_keys(
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        leaf_index: LeafIndex,
        leaf_secret: &Secret,
        path: &[NodeIndex],
    ) -> (Self, Vec<HpkePublicKey>) {
        let mut private_tree = PrivateTree::from_leaf_secret(backend, leaf_index, leaf_secret);
        // Compute path secrets and generate keypairs
        let public_keys =
            private_tree.generate_path_secrets(ciphersuite, backend, leaf_secret, path);
        (private_tree, public_keys)
    }
pub ( crate ) fn new_with_keys ( ciphersuite : & Ciphersuite , backend : & impl OpenMlsCryptoProvider , leaf_index : LeafIndex , leaf_secret : & Secret , path : & [ NodeIndex ] , ) -> ( Self , Vec < HpkePublicKey > ) { let mut private_tree = PrivateTree :: from_leaf_secret ( backend , leaf_index , leaf_secret ) ; // Compute path secrets and generate keypairs let public_keys = private_tree . generate_path_secrets ( ciphersuite , backend , leaf_secret , path ) ; ( private_tree , public_keys ) }
Creates a `PrivateTree` with a new private key, leaf secret and path
The private key is derived from the leaf secret.
Creates a ` PrivateTree ` with a new private key leaf secret and path The private key is derived from the leaf secret .
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
leaf_index
LeafIndex
leaf_secret
&Secret
path
&[NodeIndex]
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
leaf_index
LeafIndex
leaf_secret
&Secret
path
&[NodeIndex]