LibDap
This library contains the basic modules that are used in the products of the family DAP
|
#include <math.h>
#include <stdio.h>
#include <stdint.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "dap_enc_base64.h"
Macros | |
#define | b64_malloc(ptr) malloc(ptr) |
#define | b64_realloc(ptr, size) realloc(ptr, size) |
Typedefs | |
typedef unsigned char | byte |
Functions | |
int | B64_GetSize (int sz, int isEncode) |
void | B64_Encode (const byte *srcBytes, int srcLen, char *outChars) |
void | B64_Decode (const char *srcChars, int srcLen, byte *outBytes) |
char | B64_EncodeByte (byte b) |
byte | B64_DecodeByte (byte b) |
char * | b64_encode (const unsigned char *, size_t) |
unsigned char * | b64_decode (const char *, size_t) |
unsigned char * | b64_decode_ex (const char *, size_t, size_t *) |
static const char * | b64_table_by_standard (dap_enc_b64_standard_t standard) |
b64_table_by_standard The function returns the corresponding table of indices More... | |
size_t | dap_enc_base64_decode (const char *in, size_t in_size, void *out, dap_enc_b64_standard_t standard) |
dap_enc_base64_decode Function of reverse transformation of base64 algorithm More... | |
size_t | dap_enc_base64_encode (const void *a_in, size_t a_in_size, char *a_out, dap_enc_b64_standard_t standard) |
dap_enc_base64_encode The function encodes the array according to the base64 algorithm More... | |
Variables | |
static const char | b64_standart_table [] |
static const char | b64_table_url_safe [] |
#define b64_malloc | ( | ptr | ) | malloc(ptr) |
#define b64_realloc | ( | ptr, | |
size | |||
) | realloc(ptr, size) |
typedef unsigned char byte |
void B64_Decode | ( | const char * | srcChars, |
int | srcLen, | ||
byte * | outBytes | ||
) |
unsigned char* b64_decode | ( | const char * | , |
size_t | |||
) |
Dencode `char *' source with `size_t' size. Returns a `unsigned char *' base64 decoded string.
unsigned char* b64_decode_ex | ( | const char * | , |
size_t | , | ||
size_t * | |||
) |
Dencode `char *' source with `size_t' size. Returns a `unsigned char *' base64 decoded string + size of decoded string.
void B64_Encode | ( | const byte * | srcBytes, |
int | srcLen, | ||
char * | outChars | ||
) |
char* b64_encode | ( | const unsigned char * | , |
size_t | |||
) |
Encode `unsigned char *' source with `size_t' size. Returns a `char *' base64 encoded string.
char B64_EncodeByte | ( | byte | b | ) |
int B64_GetSize | ( | int | sz, |
int | isEncode | ||
) |
|
static |
b64_table_by_standard The function returns the corresponding table of indices
[in] | standard | Base64 or Base64 URLSAFE encoding |
size_t dap_enc_base64_decode | ( | const char * | in, |
size_t | in_size, | ||
void * | out, | ||
dap_enc_b64_standard_t | standard | ||
) |
dap_enc_base64_decode Function of reverse transformation of base64 algorithm
[in] | in | Pointer to an array with incoming data |
[in] | in_size | Size of the array with outgoing data |
[out] | out | Pointer to an array with outgoing data |
size_t dap_enc_base64_encode | ( | const void * | a_in, |
size_t | a_in_size, | ||
char * | a_out, | ||
dap_enc_b64_standard_t | standard | ||
) |
dap_enc_base64_encode The function encodes the array according to the base64 algorithm
[in] | a_in | Array with incoming data |
[in] | a_in_size | The size of the deviance array in the a_in parameter |
[out] | a_out | A pointer to an array in which the data will be after encoding |
|
static |
Base64 index table.
|
static |
Base64 url safe index table.