#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "inet/base64.h"
Go to the source code of this file.
Functions | |
unsigned char * | base64encode (const unsigned char *str, unsigned length, unsigned *ret_length) |
Encodes data with MIME base64. | |
unsigned char * | base64decode (const unsigned char *str, unsigned length, unsigned *ret_length) |
Decodes data encoded with MIME base64. | |
Variables | |
char | base64_table [] |
char | base64_pad = '=' |
|
Decodes data encoded with MIME base64. base64_decode() decodes encoded_data and returns the original data. The returned data may be binary.
Definition at line 116 of file base64.cpp. References base64_pad, and base64_table. |
|
Encodes data with MIME base64. This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies. Base64-encoded data takes about 33% more space than the original data.
Definition at line 51 of file base64.cpp. References base64_pad, and base64_table. Referenced by http_connect(), and http_get(). |
|
Definition at line 32 of file base64.cpp. Referenced by base64decode(), and base64encode(). |
|
Initial value: { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '\0' } Definition at line 24 of file base64.cpp. Referenced by base64decode(), and base64encode(). |