memcpy(tmp, data, data_len);
/* Decrypt the channel message (we don't check the MAC) */
+ /* XXX this could be optimized and removed all together by
+ taking a copy of the original data before encrypting it
+ and thus would not required decrypting. */
if (channel->channel_key &&
!silc_channel_message_payload_decrypt(tmp, data_len,
channel->channel_key,
int broadcast,
SilcChannelEntry channel,
uint32 mode_mask,
- SilcClientID *client_id,
- uint32 client_id_len,
+ void *id, SilcIdType id_type,
+ uint32 id_len,
SilcClientID *target,
uint32 target_len)
{
SilcBuffer idp1, idp2;
unsigned char mode[4];
- idp1 = silc_id_payload_encode((void *)client_id, SILC_ID_CLIENT);
+ idp1 = silc_id_payload_encode((void *)id, id_type);
idp2 = silc_id_payload_encode((void *)target, SILC_ID_CLIENT);
SILC_PUT32_MSB(mode_mask, mode);