// create a new GroupChannel with a given GIK
create a new GroupChannel with a given GIK
// create a new GroupChannel with a given GIK
func (p *Protocol) CreateGroupChannelWithGIK(gik *mls.GroupInitKey, uik *mls.UserInitKey) (*GroupChannel, error) {
	channel, err := NewGroupChannelWithGIK(p, gik)
	if err != nil {
		return nil, err
	}
	privKey := p.getPrivateKey(uik, gik.Cipher)
	if privKey == nil {
		return nil, ErrKeyNotFound
	}
	if err := channel.Initialize(privKey, uik.IdentityKey); err != nil {
		return nil, err
	}
	p.channels[gik.GroupId] = channel
	return channel, nil
}
func ( p * Protocol ) CreateGroupChannelWithGIK ( gik * mls . GroupInitKey , uik * mls . UserInitKey ) ( * GroupChannel , error ) { channel , err := NewGroupChannelWithGIK ( p , gik ) if err != nil { return nil , err } privKey := p . getPrivateKey ( uik , gik . Cipher ) if privKey == nil { return nil , ErrKeyNotFound } if err := channel . Initialize ( privKey , uik . IdentityKey ) ; err != nil { return nil , err } p . channels [ gik . GroupId ] = channel return channel , nil }
create a new GroupChannel with a given GIK
create a new GroupChannel with a given GIK