Function silc_channel_message_payload_decrypt
SYNOPSIS
bool silc_channel_message_payload_decrypt(unsigned char *data,
size_t data_len,
SilcCipher cipher,
SilcHmac hmac);
DESCRIPTION
Decrypt the channel message. First push the IV out of the packet `data'.
The IV is used in the decryption process. Then decrypt the message.
After decryption, take the MAC from the decrypted packet, compute MAC
and compare the MACs. If they match, the decryption was successful
and we have the channel message ready to be displayed.
This is usually used by the Channel Message interface itself but can
be called by the appliation if separate decryption process is required.
For example server might need to call this directly in some
circumstances. The `cipher' is used to decrypt the payload.
If the `hmac' is no provided then the MAC of the channel message is
not verified.
|