FreeRDP
base64.c File Reference
#include <freerdp/config.h>
#include <winpr/crt.h>
#include <freerdp/crypto/crypto.h>

Functions

static INLINE char * base64_encode_ex (const BYTE *WINPR_RESTRICT alphabet, const BYTE *WINPR_RESTRICT data, size_t length, BOOL pad, BOOL crLf, size_t lineSize)
 
static INLINE char * base64_encode (const BYTE *WINPR_RESTRICT alphabet, const BYTE *WINPR_RESTRICT data, size_t length, BOOL pad)
 
static INLINE int base64_decode_char (const signed char *WINPR_RESTRICT alphabet, char c)
 
static INLINE void * base64_decode (const signed char *WINPR_RESTRICT alphabet, const char *WINPR_RESTRICT s, size_t length, size_t *WINPR_RESTRICT data_len, BOOL pad)
 
char * crypto_base64_encode_ex (const BYTE *WINPR_RESTRICT data, size_t length, BOOL withCrLf)
 
char * crypto_base64_encode (const BYTE *WINPR_RESTRICT data, size_t length)
 
void crypto_base64_decode (const char *WINPR_RESTRICT enc_data, size_t length, BYTE **WINPR_RESTRICT dec_data, size_t *WINPR_RESTRICT res_length)
 
char * crypto_base64url_encode (const BYTE *WINPR_RESTRICT data, size_t length)
 
void crypto_base64url_decode (const char *WINPR_RESTRICT enc_data, size_t length, BYTE **WINPR_RESTRICT dec_data, size_t *WINPR_RESTRICT res_length)
 

Variables

static const BYTE enc_base64 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
 
static const BYTE enc_base64url []
 
static const signed char dec_base64url []
 
static const signed char dec_base64 []
 

Function Documentation

◆ base64_decode()

static INLINE void* base64_decode ( const signed char *WINPR_RESTRICT  alphabet,
const char *WINPR_RESTRICT  s,
size_t  length,
size_t *WINPR_RESTRICT  data_len,
BOOL  pad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ base64_decode_char()

static INLINE int base64_decode_char ( const signed char *WINPR_RESTRICT  alphabet,
char  c 
)
static
Here is the caller graph for this function:

◆ base64_encode()

static INLINE char* base64_encode ( const BYTE *WINPR_RESTRICT  alphabet,
const BYTE *WINPR_RESTRICT  data,
size_t  length,
BOOL  pad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ base64_encode_ex()

static INLINE char* base64_encode_ex ( const BYTE *WINPR_RESTRICT  alphabet,
const BYTE *WINPR_RESTRICT  data,
size_t  length,
BOOL  pad,
BOOL  crLf,
size_t  lineSize 
)
static
Here is the caller graph for this function:

◆ crypto_base64_decode()

void crypto_base64_decode ( const char *WINPR_RESTRICT  enc_data,
size_t  length,
BYTE **WINPR_RESTRICT  dec_data,
size_t *WINPR_RESTRICT  res_length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crypto_base64_encode()

char* crypto_base64_encode ( const BYTE *WINPR_RESTRICT  data,
size_t  length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crypto_base64_encode_ex()

char* crypto_base64_encode_ex ( const BYTE *WINPR_RESTRICT  data,
size_t  length,
BOOL  withCrLf 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crypto_base64url_decode()

void crypto_base64url_decode ( const char *WINPR_RESTRICT  enc_data,
size_t  length,
BYTE **WINPR_RESTRICT  dec_data,
size_t *WINPR_RESTRICT  res_length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ crypto_base64url_encode()

char* crypto_base64url_encode ( const BYTE *WINPR_RESTRICT  data,
size_t  length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ dec_base64

const signed char dec_base64[]
static

◆ dec_base64url

const signed char dec_base64url[]
static

◆ enc_base64

const BYTE enc_base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
static

FreeRDP: A Remote Desktop Protocol Implementation Base64 Encoding & Decoding

Copyright 2011-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

◆ enc_base64url

const BYTE enc_base64url[]
static
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"