libosmocore 1.10.0.64-ff3d
Osmocom core library
|
Functions | |
int | osmo_base64_encode (unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) |
Encode a buffer into base64 format. More... | |
int | osmo_base64_decode (unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) |
Decode a base64-formatted buffer. More... | |
Variables | |
static const unsigned char | base64_enc_map [64] |
static const unsigned char | base64_dec_map [128] |
int osmo_base64_decode | ( | unsigned char * | dst, |
size_t | dlen, | ||
size_t * | olen, | ||
const unsigned char * | src, | ||
size_t | slen | ||
) |
Decode a base64-formatted buffer.
dst | destination buffer (can be NULL for checking size) |
dlen | size of the destination buffer |
olen | number of bytes written |
src | source buffer |
slen | amount of data to be decoded |
References base64_dec_map, n, and x.
int osmo_base64_encode | ( | unsigned char * | dst, |
size_t | dlen, | ||
size_t * | olen, | ||
const unsigned char * | src, | ||
size_t | slen | ||
) |
Encode a buffer into base64 format.
dst | destination buffer |
dlen | size of the destination buffer |
olen | number of bytes written |
src | source buffer |
slen | amount of data to be encoded |
References base64_enc_map, and n.
|
static |
Referenced by osmo_base64_decode().
|
static |
Referenced by osmo_base64_encode().