Function silc_message_payload_encrypt
SYNOPSIS
SilcBool silc_message_payload_encrypt(unsigned char *data,
SilcUInt32 data_len,
SilcUInt32 true_len,
unsigned char *iv,
SilcID *sender_id,
SilcID *receiver_id,
SilcCipher cipher,
SilcHmac hmac);
DESCRIPTION
This function is used to encrypt the Messsage Payload which is
the `data' and `data_len'. The `data_len' is the data length which
is used to create MAC out of. The `data' MUST have additional space
after `true_len' bytes for the MAC which is appended to the data.
The `sender_id' is the ID message sender and `receiver_id' is ID of
message receiver.
This is usually used by the Message Payload interface itself but can
be called by the appliation if separate encryption process is required.
For example server might need to call this directly in some
circumstances. The `cipher' is used to encrypt the payload and `hmac'
to compute the MAC for the payload.
|