Apache Portable Runtime
Loading...
Searching...
No Matches
Functions

Functions

int apr_base64_encode_len (int len)
 
int apr_base64_encode (char *coded_dst, const char *plain_src, int len_plain_src)
 
int apr_base64_encode_binary (char *coded_dst, const unsigned char *plain_src, int len_plain_src)
 
char * apr_pbase64_encode (apr_pool_t *p, const char *string)
 
int apr_base64_decode_len (const char *coded_src)
 
int apr_base64_decode (char *plain_dst, const char *coded_src)
 
int apr_base64_decode_binary (unsigned char *plain_dst, const char *coded_src)
 
char * apr_pbase64_decode (apr_pool_t *p, const char *bufcoded)
 

Detailed Description

Function Documentation

◆ apr_base64_decode()

int apr_base64_decode ( char * plain_dst,
const char * coded_src )

Decode a string to plain text. On EBCDIC machines, the result is then converted to EBCDIC.

Parameters
plain_dstThe destination string for the plain text. A \0 is appended.
coded_srcThe encoded string
Returns
the length of the plain text string (excluding the trailing \0)

◆ apr_base64_decode_binary()

int apr_base64_decode_binary ( unsigned char * plain_dst,
const char * coded_src )

Decode an string to plain text. This is the same as apr_base64_decode() except no \0 is appended and on EBCDIC machines, the conversion of the output to EBCDIC is left out.

Parameters
plain_dstThe destination string for the plain text. The string is not \0-terminated.
coded_srcThe encoded string
Returns
the length of the plain text string

◆ apr_base64_decode_len()

int apr_base64_decode_len ( const char * coded_src)

Determine the maximum buffer length required to decode the plain text string given the encoded string.

Parameters
coded_srcThe encoded string
Returns
the maximum required buffer length for the plain text string

◆ apr_base64_encode()

int apr_base64_encode ( char * coded_dst,
const char * plain_src,
int len_plain_src )

Encode a text string using base64encoding. On EBCDIC machines, the input is first converted to ASCII.

Parameters
coded_dstThe destination string for the encoded string. A \0 is appended.
plain_srcThe original string in plain text
len_plain_srcThe length of the plain text string
Returns
the length of the encoded string, including the trailing \0

◆ apr_base64_encode_binary()

int apr_base64_encode_binary ( char * coded_dst,
const unsigned char * plain_src,
int len_plain_src )

Encode an text string using base64encoding. This is the same as apr_base64_encode() except on EBCDIC machines, where the conversion of the input to ASCII is left out.

Parameters
coded_dstThe destination string for the encoded string. A \0 is appended.
plain_srcThe original string in plain text
len_plain_srcThe length of the plain text string
Returns
the length of the encoded string, including the trailing \0

◆ apr_base64_encode_len()

int apr_base64_encode_len ( int len)

Given the length of an un-encoded string, get the length of the encoded string.

Parameters
lenthe length of an unencoded string.
Returns
the length of the string after it is encoded, including the trailing \0

◆ apr_pbase64_decode()

char * apr_pbase64_decode ( apr_pool_t * p,
const char * bufcoded )

Decode a base64 encoded string into memory allocated from a pool

Parameters
pThe pool to allocate from
bufcodedThe encoded string
Returns
The decoded string

◆ apr_pbase64_encode()

char * apr_pbase64_encode ( apr_pool_t * p,
const char * string )

Encode a string into memory allocated from a pool in base 64 format

Parameters
pThe pool to allocate from
stringThe plaintext string
Returns
The encoded string