memcached  1.6.15
About: memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load.
  Fossies Dox: memcached-1.6.15.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

base64.c File Reference
#include <stddef.h>
#include "base64.h"
Include dependency graph for base64.c:

Go to the source code of this file.

Functions

size_t base64_encode (const unsigned char *src, size_t len, unsigned char *out, size_t out_len)
 
size_t base64_decode (const unsigned char *src, size_t len, unsigned char *out, size_t out_len)
 

Variables

static const unsigned char base64_table [65]
 
static const unsigned char dtable [256]
 

Function Documentation

◆ base64_decode()

size_t base64_decode ( const unsigned char *  src,
size_t  len,
unsigned char *  out,
size_t  out_len 
)

base64_decode - Base64 decode @src: Data to be decoded @len: Length of the data to be decoded @out: Output buffer to decode into @out_len: Length of output buffer Returns: Length of encoded data, or 0 on failure

Definition at line 150 of file base64.c.

References dtable.

Referenced by _meta_flag_preparse(), and process_meta_command().

◆ base64_encode()

size_t base64_encode ( const unsigned char *  src,
size_t  len,
unsigned char *  out,
size_t  out_len 
)

base64_encode - Base64 encode @src: Data to be encoded @len: Length of the data to be encoded @out: output uffer @out_len: length of output buffer Returns: Number of actual bytes encoded into the buffer or 0 on failure

Output buffer is nul terminated to make it easier to use as a C string. The nul terminator is * not included in the return length.

Definition at line 93 of file base64.c.

References base64_table.

Referenced by process_meta_command().

Variable Documentation

◆ base64_table

const unsigned char base64_table[65]
static
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Definition at line 53 of file base64.c.

Referenced by base64_encode().

◆ dtable

const unsigned char dtable[256]
static
Initial value:
= {
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
62, 128, 128, 128, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 128, 128, 128, 0, 128, 128, 128, 0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 128, 128, 128, 128, 128, 128, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128
}

Definition at line 59 of file base64.c.

Referenced by base64_decode().