Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2006 Pekka Riikonen
+ Copyright (C) 1997 - 2007 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
* SilcBool static_key,
* SilcCipher cipher,
* SilcHmac hmac,
+ * unsigned char *sender_id,
+ * SilcUInt32 sender_id_len,
+ * unsigned char *receiver_id,
+ * SilcUInt32 receiver_id_len,
* SilcBool check_mac);
*
* DESCRIPTION
* (Key Agreement was done for the key) then it MUST be FALSE. For
* channel messages the `static_key' is ignored.
*
+ * The `sender_id' and `receiver_id' are the IDs from the packet header
+ * of the packet where this message payload was received.
+ *
* 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
SilcBool static_key,
SilcCipher cipher,
SilcHmac hmac,
+ unsigned char *sender_id,
+ SilcUInt32 sender_id_len,
+ unsigned char *receiver_id,
+ SilcUInt32 receiver_id_len,
SilcBool check_mac);
/****f* silccore/SilcMessageAPI/silc_message_payload_parse
* SilcBool static_key,
* SilcCipher cipher,
* SilcHmac hmac,
+ * unsigned char *sender_id,
+ * SilcUInt32 sender_id_len,
+ * unsigned char *receiver_id,
+ * SilcUInt32 receiver_id_len,
* SilcStack stack,
* SilcBool no_allocation,
* SilcMessagePayload message);
* then this assumes that the packet was decrypted with session keys
* (no private message key) and this merely decodes the payload.
*
+ * The `sender_id' and `receiver_id' are the IDs from the packet header
+ * of the packet where this message payload was received.
+ *
* If the `message' is non-NULL then that pre-allocated context is
* used in parsing. Same context is returned. Otherwise new context
* is allocated and returned. If the `stack' is non-NULL then memory
SilcBool static_key,
SilcCipher cipher,
SilcHmac hmac,
+ unsigned char *sender_id,
+ SilcUInt32 sender_id_len,
+ unsigned char *receiver_id,
+ SilcUInt32 receiver_id_len,
SilcStack stack,
SilcBool no_allocation,
SilcMessagePayload message);
* SilcUInt32 data_len,
* SilcUInt32 true_len,
* unsigned char *iv,
+ * SilcID *sender_id,
+ * SilcID *receiver_id,
* SilcCipher cipher,
* SilcHmac hmac);
*
* 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.
SilcUInt32 data_len,
SilcUInt32 true_len,
unsigned char *iv,
+ SilcID *sender_id,
+ SilcID *receiver_id,
SilcCipher cipher,
SilcHmac hmac);
* SilcPublicKey public_key,
* SilcPrivateKey private_key,
* SilcHash hash,
+ * SilcID *sender_id,
+ * SilcID *receiver_id,
* SilcBuffer buffer);
*
* DESCRIPTION
* be included in the message. The `private_message' and `hash' MUST
* be provided. The `hash' SHOULD be SHA1.
*
+ * The `sender_id' is the ID message sender and `receiver_id' is ID of
+ * message receiver.
+ *
* If the `buffer' is non-NULL then the payload will be encoded into
* that buffer. The same buffer is returned. Otherwise new buffer is
* allocated and returned. The `buffer' will be automatically enlarged
SilcPublicKey public_key,
SilcPrivateKey private_key,
SilcHash hash,
+ SilcID *sender_id,
+ SilcID *receiver_id,
SilcBuffer buffer);
/****f* silccore/SilcMessageAPI/silc_message_payload_free