This documenta- tion describes the current state of development.
Note that interfaces and functionality may still change.

Prokee Modules:
  A
  B
  C
  D
  E
  F
  G
  I
  L
  M
  N
  O
  P
  R
  S
  T
  U
  W

     open all    |    close all

GUI Elements:
  B
  C
  I
  M
  P
  R
  S
  T

     open all    |    close all

GUI Interactions:
  B
  F
  H
  S

     open all    |    close all

GUI Layouts:
  L

     open all    |    close all

Games/Demos:
  M

     open all    |    close all

Third Party Libraries:
  P
  F
  Z

     open all    |    close all

Information about this Website / Informationen zu dieser Webseite:
In case of any questions, or comments, please feel free to contact me via email at apoll500@gmail.com.

Module base64 [Version: ]

[Main Page]   [Details]   [Tests]   

This documentation describes the Prokee module interface.


Static Methods:
encode
These methods can be used, if the input for the encoder is a null-terminated string.
encode (version _str1)
char *base64::encode(const char *in_str)
encode (version _str2)
char *base64::encode(const char *in_str,bool padding)
encode (version _str3)
char *base64::encode(const char *in_str,bool padding,const char *sym,char pad)
encode (version _wcs1)
char *base64::encode(const wchar_t *in_str)
encode (version _wcs2)
char *base64::encode(const wchar_t *in_str,bool padding)
encode (version _wcs3)
char *base64::encode(const wchar_t *in_str,bool padding,const char *sym,char pad)
The following methods returns a new allocated buffer, in which the output is written.
encode (version _alloc1)
char *base64::encode(void *data,unsigned int length)
encode (version _alloc2)
char *base64::encode(void *data,unsigned int length,bool padding)
encode (version _alloc3)
char *base64::encode(void *data,unsigned int length,bool padding,const char *sym,char pad)
The following methods write the encoded data into an existing buffer.
encode (version 1)
int base64::encode(void *data,unsigned int length,char *bstr)
encode (version 2)
int base64::encode(void *data,unsigned int length,char *bstr,bool padding)
encode (version 3)
int base64::encode(void *data,unsigned int length,char *bstr,bool padding,const char *sym,char pad)
These versions, perform a length check on the output buffer.
encode (version _s1)
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln)
encode (version _s2)
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding)
encode (version _s3)
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding,const char *sym,char pad)
These versions reallocate the memory of the output buffer if necessary
encode (version _realloc1)
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln)
encode (version _realloc2)
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding)
encode (version _realloc3)
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding,const char *sym,char pad)
encode_url
These versions use different encoding symbols to encode data in urls.
encode_url (version 1)
char *base64::encode_url(void *data,unsigned int length,bool padding)
encode_url (version 2)
int base64::encode_url(void *data,unsigned int length,char *bstr,bool padding)
encode_url (version 3)
int base64::encode_url(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding)
encode_url (version 4)
int base64::encode_url(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding)
encode_length
Calculates the lenght of the encoded base64 string.
encode_length (version 1)
unsigned int base64::encode_length(unsigned int length)
encode_length (version 2)
unsigned int base64::encode_length(unsigned int length,bool padding)
decode_length
Calculates the length of the decoded data.
decode_length (version 1)
unsigned int base64::decode_length(unsigned int length)
decode_length (version 2)
unsigned int base64::decode_length(char *bstr)
allocating a new buffer
decode (version _alloc1)
void *base64::decode(char *bstr)
decode (version _alloc2)
void *base64::decode(char *bstr,const char *sym,char pad)
decode
writing to existing buffer
decode (version 1)
int base64::decode(char *bstr,void *data)
decode (version 2)
int base64::decode(char *bstr,void *data,const char *sym,char pad)
writing to existing buffer with length check
decode (version _s1)
int base64::decode(char *bstr,void *data,unsigned int dataln)
decode (version _s2)
int base64::decode(char *bstr,void *data,unsigned int dataln,const char *sym,char pad)
reallocating version
decode (version _realloc1)
int base64::decode(char *bstr,void **data,unsigned int *dataln)
decode (version _realloc2)
int base64::decode(char *bstr,void **data,unsigned int *dataln,const char *sym,char pad)
decode_url (version 2)
void *base64::decode_url(char *bstr)
decode_url
These versions are for url decoding
decode_url (version 1)
int base64::decode_url(char *bstr,void *data)
decode_url (version 3)
int base64::decode_url(char *bstr,void *data,unsigned int dataln)
decode_url (version 4)
int base64::decode_url(char *bstr,void **data,unsigned int *dataln)

Static Methods

   encode (version _str1)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const char *in_str)

Parameters:
const char *in_str[IN]a null-terminated string used as input for the encoder.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
Die Funktion erzeugt einen base64 String mit allfälligem Padding. Als Padding Zeichen wird '=' verwenet.
Als Alphabet für die Codierung wird 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' verwendet.
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_str1()

   encode (version _str2)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const char *in_str,bool padding)

Parameters:
const char *in_str[IN]a null-terminated string used as input for the encoder.
bool paddingwheter if padding schould be used or not.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
Falls padding auf true gesetzt wurde, erzeugt die Funktion einen base64 String mit allfälligem Padding. Anderenfalls wird kein Padding erzeugt. Als Padding Zeichen wird '=' verwenet.
Als Alphabet für die Codierung wird 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' verwendet.
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_str2()

   encode (version _str3)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const char *in_str,bool padding,const char *sym,char pad)

Parameters:
const char *in_str[IN]a null-terminated string used as input for the encoder.
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_str3()

   encode (version _wcs1)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const wchar_t *in_str)

Parameters:
const wchar_t *in_str[IN]a null-terminated string used as input for the encoder.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
Die Funktion erzeugt einen base64 String mit allfälligem Padding. Als Padding Zeichen wird '=' verwenet.
Als Alphabet für die Codierung wird 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' verwendet.
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_wcs1()

   encode (version _wcs2)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const wchar_t *in_str,bool padding)

Parameters:
const wchar_t *in_str[IN]a null-terminated string used as input for the encoder.
bool paddingwheter if padding schould be used or not.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
Falls padding auf true gesetzt wurde, erzeugt die Funktion einen base64 String mit allfälligem Padding. Anderenfalls wird kein Padding erzeugt. Als Padding Zeichen wird '=' verwenet.
Als Alphabet für die Codierung wird 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' verwendet.
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_wcs2()

   encode (version _wcs3)


Returns the base64 encoded representation of the input string in_str.

Signature:
char *base64::encode(const wchar_t *in_str,bool padding,const char *sym,char pad)

Parameters:
const wchar_t *in_str[IN]a null-terminated string used as input for the encoder.
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Return value:
The base64 encoded representation of the input string in_str.

Remarks:
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_wcs3()

   encode (version _alloc1)


Encodes the input from buffer data and returns it as base64 encoded string.

Signature:
char *base64::encode(void *data,unsigned int length)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.

Remarks:
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_alloc1()

   encode (version _alloc2)


Encodes the input from buffer data and returns it as base64 encoded string.

Signature:
char *base64::encode(void *data,unsigned int length,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
bool paddingwheter if padding schould be used or not.

Remarks:
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_alloc2()

   encode (version _alloc3)


Encodes the input from buffer data and returns it as base64 encoded string.

Signature:
char *base64::encode(void *data,unsigned int length,bool padding,const char *sym,char pad)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Remarks:
The application has to free the returned buffer.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_alloc3()

   encode (version 1)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.

Return value:
Returns 0 on successful execution.

Remarks:
Mind that bstr has to be an already allocated buffer of sufficient size.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode1()

   encode (version 2)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
bool paddingwheter if padding schould be used or not.

Return value:
Returns 0 on successful execution.

Remarks:
Mind that bstr has to be an already allocated buffer of sufficient size.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode2()

   encode (version 3)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr,bool padding,const char *sym,char pad)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Return value:
Returns 0 on successful execution.

Remarks:
Mind that bstr has to be an already allocated buffer of sufficient size.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode3()

   encode (version _s1)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
unsigned int blnLength of buffer bstr

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_s1()

   encode (version _s2)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
unsigned int blnLength of buffer bstr
bool paddingwheter if padding schould be used or not.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_s2()

   encode (version _s3)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding,const char *sym,char pad)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
unsigned int blnLength of buffer bstr
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Tests:
test1: Encode/Decode-Test.
    Test function: base64_encode_s3()

   encode (version _realloc1)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char **bstr[OUT]Receives the base64 encoded string.
unsigned int *bln[IN/OUT]Length of buffer bstr

   encode (version _realloc2)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char **bstr[OUT]Receives the base64 encoded string.
unsigned int *bln[IN/OUT]Length of buffer bstr
bool paddingwheter if padding schould be used or not.

   encode (version _realloc3)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding,const char *sym,char pad)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char **bstr[OUT]Receives the base64 encoded string.
unsigned int *bln[IN/OUT]Length of buffer bstr
bool paddingwheter if padding schould be used or not.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

   encode_url (version 1)


Encodes the input from buffer data and returns it as base64 encoded string.

Signature:
char *base64::encode_url(void *data,unsigned int length,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
bool paddingwheter if padding schould be used or not.

Remarks:
The application has to free the returned buffer.

   encode_url (version 2)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode_url(void *data,unsigned int length,char *bstr,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
bool paddingwheter if padding schould be used or not.

   encode_url (version 3)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode_url(void *data,unsigned int length,char *bstr,unsigned int bln,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char *bstr[OUT]Receives the base64 encoded string.
unsigned int blnLength of buffer bstr
bool paddingwheter if padding schould be used or not.

   encode_url (version 4)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::encode_url(void *data,unsigned int length,char **bstr,unsigned int *bln,bool padding)

Parameters:
void *data[IN]The data to be encoded.
unsigned int lengthThe length in bytes of the data to be encoded. This mus not be 0.
char **bstr[OUT]Receives the base64 encoded string.
unsigned int *bln[IN/OUT]Length of buffer bstr
bool paddingwheter if padding schould be used or not.

   encode_length (version 1)


This function calculates the length (in bytes) of the encoded string.

Signature:
unsigned int base64::encode_length(unsigned int length)

Parameters:
unsigned int lengthThe length in bytes of the data to be encoded.

Return value:
The length in bytes of the base64 encoded string.

   encode_length (version 2)


This function calculates the length (in bytes) of the encoded string.

Signature:
unsigned int base64::encode_length(unsigned int length,bool padding)

Parameters:
unsigned int lengthThe length in bytes of the data to be encoded.
bool paddingwheter if padding schould be used or not.

Return value:
The length in bytes of the base64 encoded string.

   decode_length (version 1)


This function calculates the length (in bytes) of the decoded string.

Signature:
unsigned int base64::decode_length(unsigned int length)

Parameters:
unsigned int lengthThe length in bytes of the base64 string to be decoded.

Return value:
The length in bytes of the decoded data.

   decode_length (version 2)


This function calculates the length (in bytes) of the decoded string.

Signature:
unsigned int base64::decode_length(char *bstr)

Parameters:
char *bstr[IN]The base64 encoded string.

Return value:
The length in bytes of the decoded data.

   decode (version _alloc1)


Decodes the input from buffer bstr and returns the decoded data.

Signature:
void *base64::decode(char *bstr)

Parameters:
char *bstr[IN]The base64 encoded string.

Remarks:
The application has to free the returned buffer.

   decode (version _alloc2)


Decodes the input from buffer bstr and returns the decoded data.

Signature:
void *base64::decode(char *bstr,const char *sym,char pad)

Parameters:
char *bstr[IN]The base64 encoded string.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Remarks:
The application has to free the returned buffer.

   decode (version 1)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void *data)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.

Remarks:
Mind that the buffer data has to be already allocated and of sufficient size.

   decode (version 2)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void *data,const char *sym,char pad)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

Remarks:
Mind that the buffer data has to be already allocated and of sufficient size.

   decode (version _s1)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void *data,unsigned int dataln)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.
unsigned int datalnThe length of the buffer data.

   decode (version _s2)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void *data,unsigned int dataln,const char *sym,char pad)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.
unsigned int datalnThe length of the buffer data.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

   decode (version _realloc1)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void **data,unsigned int *dataln)

Parameters:
char *bstr[IN]The base64 encoded string.
void **data[OUT]Receives the decoded data.
unsigned int *dataln[IN/OUT]The length of the buffer data.

   decode (version _realloc2)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode(char *bstr,void **data,unsigned int *dataln,const char *sym,char pad)

Parameters:
char *bstr[IN]The base64 encoded string.
void **data[OUT]Receives the decoded data.
unsigned int *dataln[IN/OUT]The length of the buffer data.
const char *sym[IN]a null-terminated array holding the symbols to be used for encoding. For standard base64 encoding, sym should be set to "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/". The array can be given as null-terminated string constant. Mind that the array has to contain exactly 64 characters. The function will fail, otherwise. All characters need to be different.
char padthe padding character. For standard base64 encoding, pad should be set to '='.

   decode_url (version 2)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
void *base64::decode_url(char *bstr)

Parameters:
char *bstr[IN]The base64 encoded string.

Remarks:
The application has to free the returned buffer.

   decode_url (version 1)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode_url(char *bstr,void *data)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.

Remarks:
Mind that the buffer data has to be already allocated and of sufficient size.

   decode_url (version 3)


Encodes the input from buffer data and writes the output to the existing buffer bstr.

Signature:
int base64::decode_url(char *bstr,void *data,unsigned int dataln)

Parameters:
char *bstr[IN]The base64 encoded string.
void *data[OUT]Receives the decoded data.
unsigned int datalnThe length of the buffer data.

   decode_url (version 4)


Decodes the input from buffer bstr and writes the output to the existing buffer data.

Signature:
int base64::decode_url(char *bstr,void **data,unsigned int *dataln)

Parameters:
char *bstr[IN]The base64 encoded string.
void **data[OUT]Receives the decoded data.
unsigned int *dataln[IN/OUT]The length of the buffer data.


Copyright © 2017 2018 by Andreas Pollhammer