Mistake on this page? Email us
Base64 Encoding

Functions

int apr_base64_encode_len (int len)
 
int apr_base64_encode_binary (char *coded_dst, const unsigned char *plain_src, int len_plain_src)
 
int apr_base64_decode_len (const char *coded_src)
 
int apr_base64_decode_binary (unsigned char *plain_dst, const char *coded_src)
 

Detailed Description

Function Documentation

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

Decode an EBCDIC string to binary.

Parameters
plain_dstThe destination buffer for the binary data.
coded_srcThe encoded string.
Returns
The length of the decoded buffer.
int apr_base64_decode_len ( const char *  coded_src)

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

Parameters
coded_srcThe encoded string.
Returns
The maximum required buffer length for the plain text string.
int apr_base64_encode_binary ( char *  coded_dst,
const unsigned char *  plain_src,
int  len_plain_src 
)

Encode an EBCDIC string using base64encoding.

Parameters
coded_dstThe destination string for the encoded string.
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 \0 string termination character!
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.