ACE  6.3.3
Protected Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
ACE_Base64 Class Reference

Encode/Decode a stream of bytes according to Base64 encoding. More...

#include <Codecs.h>

Static Public Member Functions

static ACE_Byteencode (const ACE_Byte *input, const size_t input_len, size_t *output_len, bool is_chunked=true)
 
static ACE_Bytedecode (const ACE_Byte *input, size_t *output_len)
 
static size_t length (const ACE_Byte *input)
 

Protected Member Functions

 ACE_Base64 (void)
 

Private Member Functions

 ACE_Base64 (ACE_Base64 const &)
 
ACE_Base64operator= (ACE_Base64 const &)
 

Static Private Member Functions

static void init (void)
 Initialize the tables for encoding/decoding. More...
 

Static Private Attributes

static ACE_Byte decoder_ []
 Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i. More...
 
static ACE_Byte member_ []
 
static bool init_ = false
 Boolean to denote whether initialization is complete. More...
 

Detailed Description

Encode/Decode a stream of bytes according to Base64 encoding.

This class provides methods to encode or decode a stream of bytes to/from Base64 encoding. It doesn't convert the input stream to a canonical form before encoding.

Constructor & Destructor Documentation

ACE_Base64::ACE_Base64 ( void  )
inlineprotected
ACE_Base64::ACE_Base64 ( ACE_Base64 const &  )
private

Member Function Documentation

ACE_Byte * ACE_Base64::decode ( const ACE_Byte input,
size_t *  output_len 
)
static

Decodes a stream of Base64 to bytes data

Parameters
inputEncoded Base64 data in byte stream.
output_lenLength of the binary byte stream.
Returns
Binary data in byte stream or NULL if input data cannot be encoded.
ACE_Byte * ACE_Base64::encode ( const ACE_Byte input,
const size_t  input_len,
size_t *  output_len,
bool  is_chunked = true 
)
static

Encodes a stream of bytes to Base64 data

Parameters
inputBinary data in byte stream.
input_lenLength of the byte stream.
output_lenLength of the encoded Base64 byte stream.
is_chunkedIf true, terminate 72 character blocks with newline
Returns
Encoded Base64 data in byte stream or NULL if input data cannot be encoded.
void ACE_Base64::init ( void  )
staticprivate

Initialize the tables for encoding/decoding.

size_t ACE_Base64::length ( const ACE_Byte input)
static

Return the length of the encoded input data

Parameters
inputEncoded Base64 data in byte stream.
Returns
Length of the encoded Base64 data.
ACE_Base64& ACE_Base64::operator= ( ACE_Base64 const &  )
private

Member Data Documentation

ACE_Byte ACE_Base64::decoder_
staticprivate

Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i.

bool ACE_Base64::init_ = false
staticprivate

Boolean to denote whether initialization is complete.

ACE_Byte ACE_Base64::member_
staticprivate

Alphabet used to check valid range of encoded input i.e member_[alphabet_[0..63]] = 1


The documentation for this class was generated from the following files: