5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2005 - 2007 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 /****h* silccore/SILC Public Key Payload
24 * Implementation of the Public Key Payload. Public Key Payload is used to
25 * deliver different types of public keys and certificates in the SILC
33 /****f* silccore/SilcPubKeyAPI/silc_public_key_payload_encode
37 * SilcBuffer silc_public_key_payload_encode(SilcStack stack,
38 * SilcPublicKey public_key);
42 * Encodes the Public Key Payload from the public key indicated by
43 * `public_key'. Returns the allocated and encoded payload buffer,
46 * If `stack' is non-NULL the returned buffer is allocated from `stack'.
47 * This call will consume the `stack' so caller should push the stack
48 * before calling and then later pop it.
51 SilcBuffer silc_public_key_payload_encode(SilcStack stack,
52 SilcPublicKey public_key);
54 /****f* silccore/SilcPubKeyAPI/silc_public_key_payload_decode
58 * SilcBool silc_public_key_payload_decode(unsigned char *data,
59 * SilcUInt32 data_len,
60 * SilcPublicKey *public_key);
64 * Decodes Public Key Payload from `data' of `data_len' bytes in length
65 * data buffer into `public_key' pointer. Returns FALSE if the payload
69 SilcBool silc_public_key_payload_decode(unsigned char *data,
71 SilcPublicKey *public_key);
73 #endif /* SILCPUBKEY_H */