pub fn create_group(&mut self, name: String) {
        log::debug!("{} creates group {}", self.username, name);
        let group_id = name.as_bytes();
        let mut group_aad = group_id.to_vec();
        group_aad.extend(b" AAD");
        let kpb = self.identity.borrow_mut().update(&self.crypto);
        let config = MlsGroupConfig::default();
        let mls_group = MlsGroup::new(
            group_id,
            CIPHERSUITE,
            &self.crypto,
            kpb,
            config,
            None, /* Initial PSK */
            None, /* MLS version */
        )
        .unwrap();
        let group = Group {
            group_id: group_id.to_vec(),
            group_name: name.clone(),
            members: Vec::new(),
            conversation: Conversation::default(),
            mls_group: RefCell::new(mls_group),
            group_aad,
            pending_proposals: Vec::new(),
        };
        if self
            .groups
            .borrow_mut()
            .insert(group_id.to_vec(), group)
            .is_some()
        {
            panic!("Group '{}' existed already", name);
        }
    }
/// Create a group with the given name.
Create a group with the given name.
Create a group with the given name .
pub fn create_group(&mut self, name: String) {
        log::debug!("{} creates group {}", self.username, name);
        let group_id = name.as_bytes();
        let mut group_aad = group_id.to_vec();
        group_aad.extend(b" AAD");
        let kpb = self.identity.borrow_mut().update(&self.crypto);
        let config = MlsGroupConfig::default();
        let mls_group = MlsGroup::new(
            group_id,
            CIPHERSUITE,
            &self.crypto,
            kpb,
            config,
            None, /* Initial PSK */
            None, /* MLS version */
        )
        .unwrap();
        let group = Group {
            group_id: group_id.to_vec(),
            group_name: name.clone(),
            members: Vec::new(),
            conversation: Conversation::default(),
            mls_group: RefCell::new(mls_group),
            group_aad,
            pending_proposals: Vec::new(),
        };
        if self
            .groups
            .borrow_mut()
            .insert(group_id.to_vec(), group)
            .is_some()
        {
            panic!("Group '{}' existed already", name);
        }
    }
pub fn create_group ( & mut self , name : String ) { log :: debug ! ( " " self username name ) ; let group_id = name . as_bytes ( ) ; let mut group_aad = group_id . to_vec ( ) ; group_aad . extend ( b" " ) ; let kpb = self . identity . borrow_mut ( ) . update ( & self . crypto ) ; let config = MlsGroupConfig :: default ( ) ; let mls_group = MlsGroup :: new ( group_id , CIPHERSUITE , & self . crypto , kpb , config , None , /* Initial PSK */ None , /* MLS version */ ) . unwrap ( ) ; let group = Group { group_id : group_id . to_vec ( ) , group_name : name . clone ( ) , members : Vec :: new ( ) , conversation : Conversation :: default ( ) , mls_group : RefCell :: new ( mls_group ) , group_aad , pending_proposals : Vec :: new ( ) , } ; if self . groups . borrow_mut ( ) . insert ( group_id . to_vec ( ) , group ) . is_some ( ) { panic ! ( " " name ) ; } }
Create a group with the given name.
Create a group with the given name .
&mut self
name
String
&mut self
name
String