示例#1
0
func (k *Key) SetId(id []byte, group_id uint32) error {
	if len(id) > DNET_ID_SIZE {
		return ErrInvalidDnetID
	}

	C.key_set_id(k.key, unsafe.Pointer(&id[0]), C.int(len(id)), C.int(group_id))
	return nil
}
示例#2
0
func (k *Key) SetId(id []byte, group_id uint32) {
	C.key_set_id(k.key, unsafe.Pointer(&id[0]), C.int(len(id)), C.int(group_id))
	return
}