Function silc_message_payload_decrypt
SYNOPSIS
bool silc_message_payload_decrypt(unsigned char *data,
size_t data_len,
bool private_message,
bool static_key,
SilcCipher cipher,
SilcHmac hmac,
bool check_mac);
DESCRIPTION
Decrypt Message Payload indicated by `data'. If the payload is
channel message then `private_message' is FALSE, and if it is
private message it is TRUE. If the private message key is static
(pre-shared key) then protocol dictates that the IV is present
and `static_key' must be set to TRUE. If the key is not static
(Key Agreement was done for the key) then it MUST be FALSE. For
channel messages the `static_key' is ignored.
This is usually used by the Message Payload 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
`check_mac' is FALSE then MAC is not verified.
|