Function silc_channel_message_payload_encode
SYNOPSIS
SilcBuffer silc_channel_message_payload_encode(uint16 flags,
uint16 data_len,
const unsigned char *data,
uint16 iv_len,
unsigned char *iv,
SilcCipher cipher,
SilcHmac hmac);
DESCRIPTION
Encodes channel message payload into a buffer and returns it. This
is used to add channel message payload into a packet. As the channel
payload is encrypted separately from other parts of the packet padding
must be applied to the payload. The function generates the padding
automatically from random data. The `cipher' is the cipher used
encrypt the payload and `hmac' is used to compute the MAC for the
payload.