b64.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2008- The University of Notre Dame
00003 This software is distributed under the GNU General Public License.
00004 See the file COPYING for details.
00005 */
00006 
00007 #ifndef B64_H
00008 #define B64_H
00009 
00010 #include "buffer.h"
00011 
00012 #include <stddef.h>
00013 
00025 static inline size_t b64_size (size_t bloblen)
00026 {
00027         /* Ceil division by 3 multiplied by 4 */
00028         return 1 /* NUL byte */ + (bloblen + 3 - 1) / 3 * 4;
00029 }
00030 
00041 int b64_encode(const void *blob, size_t bloblen, buffer_t *Bb64);
00042 
00053 int b64_decode(const char *b64, buffer_t *Bblob);
00054 
00055 #endif /* B64_H */
00056 
00057 /* vim: set noexpandtab tabstop=4: */

Generated on 14 Jul 2016 for cctools by  doxygen 1.6.1