Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2007 Pekka Riikonen
+ Copyright (C) 2007 - 2008 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
*/
-/****h* silcutil/SILC Base64 API
+/****h* silcutil/Base64 Interface
*
* DESCRIPTION
*
#ifndef SILCBASE64_H
#define SILCBASE64_H
-/****f* silcutil/SilcBase64API/silc_base64_encode
+/****f* silcutil/silc_base64_encode
*
* SYNOPSIS
*
* DESCRIPTION
*
* Encodes data into Base 64 (PEM) encoding. Returns NULL terminated
- * Base 64 encoded data string.
+ * Base 64 encoded data string. Returns NULL if system is out of memory.
*
* If `stack' is non-NULL the returned buffer is allocated from `stack'.
*
***/
char *silc_base64_encode(SilcStack stack, unsigned char *data, SilcUInt32 len);
-/****f* silcutil/SilcBase64API/silc_base64_encode_file
+/****f* silcutil/silc_base64_encode_file
*
* SYNOPSIS
*
* DESCRIPTION
*
* Same as silc_base64_encode() but puts newline ('\n') every 72
- * characters.
+ * characters. Returns NULL if system is out of memory.
*
* If `stack' is non-NULL the returned buffer is allocated from `stack'.
*
char *silc_base64_encode_file(SilcStack stack,
unsigned char *data, SilcUInt32 data_len);
-/****f* silcutil/SilcBase64API/silc_base_decode
+/****f* silcutil/silc_base_decode
*
* SYNOPSIS
*
*
* DESCRIPTION
*
- * Decodes Base 64 (PEM) into data. Returns the decoded data.
+ * Decodes Base 64 (PEM) into data. Returns the decoded data. Returns
+ * NULL if the data is not valid Base 64 encoded data.
*
* If `stack' is non-NULL the returned buffer is allocated from `stack'.
*