Go to the source code of this file.
Classes | |
struct | base64_encode_ctx |
struct | base64_decode_ctx |
Macros | |
#define | BASE64_ENCODE_LENGTH(length) (((length) * 8 + 4)/6) |
#define | BASE64_ENCODE_FINAL_LENGTH 3 |
#define | BASE64_ENCODE_RAW_LENGTH(length) ((((length) + 2)/3)*4) |
#define | BASE64_DECODE_LENGTH(length) ((((length) + 1) * 6) / 8) |
#define | base64_encode_len(length) (BASE64_ENCODE_LENGTH(length)+BASE64_ENCODE_FINAL_LENGTH+1) |
Functions | |
void | base64_encode_init (struct base64_encode_ctx *ctx) |
void | base64url_encode_init (struct base64_encode_ctx *ctx) |
size_t | base64_encode_single (struct base64_encode_ctx *ctx, char *dst, uint8_t src) |
size_t | base64_encode_update (struct base64_encode_ctx *ctx, char *dst, size_t length, const uint8_t *src) |
size_t | base64_encode_final (struct base64_encode_ctx *ctx, char *dst) |
void | base64_encode_raw (char *dst, size_t length, const uint8_t *src) |
void | base64_encode_group (char *dst, uint32_t group) |
void | base64_decode_init (struct base64_decode_ctx *ctx) |
void | base64url_decode_init (struct base64_decode_ctx *ctx) |
int | base64_decode_single (struct base64_decode_ctx *ctx, uint8_t *dst, char src) |
int | base64_decode_update (struct base64_decode_ctx *ctx, size_t *dst_length, uint8_t *dst, size_t src_length, const char *src) |
int | base64_decode_final (struct base64_decode_ctx *ctx) |
Macro Definition Documentation
◆ BASE64_DECODE_LENGTH
#define BASE64_DECODE_LENGTH | ( | length | ) | ((((length) + 1) * 6) / 8) |
◆ BASE64_ENCODE_FINAL_LENGTH
◆ base64_encode_len
#define base64_encode_len | ( | length | ) | (BASE64_ENCODE_LENGTH(length)+BASE64_ENCODE_FINAL_LENGTH+1) |
◆ BASE64_ENCODE_LENGTH
#define BASE64_ENCODE_LENGTH | ( | length | ) | (((length) * 8 + 4)/6) |
◆ BASE64_ENCODE_RAW_LENGTH
#define BASE64_ENCODE_RAW_LENGTH | ( | length | ) | ((((length) + 2)/3)*4) |
Function Documentation
◆ base64_decode_final()
int base64_decode_final | ( | struct base64_decode_ctx * | ctx | ) |
Definition at line 159 of file base64.c.
References base64_decode_ctx::bits.
Referenced by decode_pub_auth(), HttpHeader::getAuthToken(), main(), manage_request(), processingLoop(), and token_decode().
◆ base64_decode_init()
void base64_decode_init | ( | struct base64_decode_ctx * | ctx | ) |
Definition at line 54 of file base64.c.
References base64_decode_ctx::bits, base64_decode_ctx::padding, base64_decode_ctx::table, and base64_decode_ctx::word.
Referenced by decode_pub_auth(), HttpHeader::getAuthToken(), main(), manage_request(), processingLoop(), and token_decode().
◆ base64_decode_single()
int base64_decode_single | ( | struct base64_decode_ctx * | ctx, |
uint8_t * | dst, | ||
char | src | ||
) |
Definition at line 82 of file base64.c.
References assert, base64_decode_ctx::bits, base64_decode_ctx::padding, base64_decode_ctx::table, TABLE_END, TABLE_INVALID, TABLE_SPACE, and base64_decode_ctx::word.
Referenced by base64_decode_update().
◆ base64_decode_update()
int base64_decode_update | ( | struct base64_decode_ctx * | ctx, |
size_t * | dst_length, | ||
uint8_t * | dst, | ||
size_t | src_length, | ||
const char * | src | ||
) |
Definition at line 129 of file base64.c.
References assert, BASE64_DECODE_LENGTH, and base64_decode_single().
Referenced by decode_pub_auth(), HttpHeader::getAuthToken(), main(), manage_request(), processingLoop(), and token_decode().
◆ base64_encode_final()
size_t base64_encode_final | ( | struct base64_encode_ctx * | ctx, |
char * | dst | ||
) |
Definition at line 308 of file base64.c.
References base64_encode_ctx::alphabet, assert, BASE64_ENCODE_FINAL_LENGTH, base64_encode_ctx::bits, ENCODE, and base64_encode_ctx::word.
Referenced by Format::Format::assemble(), Authorization::commit(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), main(), make_auth_header(), make_challenge(), make_pub_auth(), Adaptation::Icap::ModXact::makeRequestHeaders(), and Adaptation::Icap::ModXact::makeUsernameHeader().
◆ base64_encode_group()
void base64_encode_group | ( | char * | dst, |
uint32_t | group | ||
) |
Definition at line 223 of file base64.c.
References base64_encode_table, and ENCODE.
◆ base64_encode_init()
void base64_encode_init | ( | struct base64_encode_ctx * | ctx | ) |
Definition at line 232 of file base64.c.
References base64_encode_ctx::alphabet, base64_encode_table, base64_encode_ctx::bits, and base64_encode_ctx::word.
Referenced by Format::Format::assemble(), Authorization::commit(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), main(), make_auth_header(), make_challenge(), make_pub_auth(), Adaptation::Icap::ModXact::makeRequestHeaders(), and Adaptation::Icap::ModXact::makeUsernameHeader().
◆ base64_encode_raw()
void base64_encode_raw | ( | char * | dst, |
size_t | length, | ||
const uint8_t * | src | ||
) |
Definition at line 217 of file base64.c.
References base64_encode_table, and encode_raw().
◆ base64_encode_single()
size_t base64_encode_single | ( | struct base64_encode_ctx * | ctx, |
char * | dst, | ||
uint8_t | src | ||
) |
Definition at line 240 of file base64.c.
References base64_encode_ctx::alphabet, assert, base64_encode_ctx::bits, ENCODE, and base64_encode_ctx::word.
Referenced by base64_encode_update().
◆ base64_encode_update()
size_t base64_encode_update | ( | struct base64_encode_ctx * | ctx, |
char * | dst, | ||
size_t | length, | ||
const uint8_t * | src | ||
) |
Definition at line 265 of file base64.c.
References base64_encode_ctx::alphabet, assert, BASE64_ENCODE_LENGTH, BASE64_ENCODE_RAW_LENGTH, base64_encode_single(), base64_encode_ctx::bits, and encode_raw().
Referenced by Format::Format::assemble(), Authorization::commit(), HttpStateData::httpBuildRequestHeader(), httpFixupAuthentication(), main(), make_auth_header(), make_challenge(), make_pub_auth(), Adaptation::Icap::ModXact::makeRequestHeaders(), and Adaptation::Icap::ModXact::makeUsernameHeader().
◆ base64url_decode_init()
void base64url_decode_init | ( | struct base64_decode_ctx * | ctx | ) |
◆ base64url_encode_init()
void base64url_encode_init | ( | struct base64_encode_ctx * | ctx | ) |