#include "common.h"
#include <glib.h>
#include <string.h>
#include "base64.h"
#include "override.h"
Functions | |
RCSID ("$Id:base64.c, v 1.7 2005/06/29 14:24:26 daichik Exp $") | |
guint | encode_pad_length (guint len, guint *pad) |
Compute the number of base64 digits and amount of padding necessary to encode `len' bytes. | |
void | base64_encode_exactly (const gchar *buf, guint len, gchar *encbuf, guint enclen) |
Encode `len' bytes from `buf' into `enclen' bytes starting from `encbuf'. | |
void | base64_encode_into (const gchar *buf, guint len, gchar *encbuf, guint enclen) |
Encode `len' bytes from `buf' into `enclen' bytes starting from `encbuf'. | |
gchar * | base64_encode (const gchar *buf, guint len, guint *retpad) |
Encode `len' bytes starting at `buf' into new allocated buffer. | |
guint | base64_decode_alphabet (const gint8 valmap[256], const gchar *buf, guint len, gchar *decbuf, guint declen) |
Decode `len' bytes from `buf' into `declen' bytes starting from `decbuf'. | |
guint | base64_decode_into (const gchar *buf, guint len, gchar *decbuf, guint declen) |
Decode `len' bytes from `buf' into `declen' bytes starting from `decbuf'. | |
gchar * | base64_decode (const gchar *buf, guint len, guint *outlen) |
Decode `len' bytes starting at `buf' into new allocated buffer. | |
Variables | |
const gint8 | values [256] |
const gchar | b64_alphabet [] |
|
Decode `len' bytes starting at `buf' into new allocated buffer.
|
|
Decode `len' bytes from `buf' into `declen' bytes starting from `decbuf'. Caller must have ensured that there was sufficient room in decbuf. Uses the specified decoding alphabet.
|
|
Decode `len' bytes from `buf' into `declen' bytes starting from `decbuf'. Caller must have ensured that there was sufficient room in decbuf.
|
|
Encode `len' bytes starting at `buf' into new allocated buffer. Trailing padding chars are emitted.
|
|
Encode `len' bytes from `buf' into `enclen' bytes starting from `encbuf'. Caller must have ensured that there was EXACTLY the needed room in encbuf. |
|
Encode `len' bytes from `buf' into `enclen' bytes starting from `encbuf'. Trailing padding chars are emitted. Caller must have ensured that there was enough room in encbuf.
|
|
Compute the number of base64 digits and amount of padding necessary to encode `len' bytes.
|
|
|
|
Initial value:
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
|
|
|