2 * Base 64 Encoding & Decoding
4 * (c) 2002, Robert Spalek <robert@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
10 uns base64_encode(byte *dest, byte *src, uns len);
11 uns base64_decode(byte *dest, byte *src, uns len);
14 * Use this macro to calculate buffer size.
16 #define BASE64_ENC_LENGTH(x) (((x)+2)/3 *4)
19 * When called for BASE64_IN_CHUNK-byte chunks, the result will be
20 * always BASE64_OUT_CHUNK bytes long. If a longer block is split
21 * to such chunks, the result will be identical.
23 #define BASE64_IN_CHUNK 3
24 #define BASE64_OUT_CHUNK 4