namespace Akenti class Base64 : public ref_ptr<Base64Impl>

A Base64 object is a reference-count pointer that wraps a Base64Impl object

Inheritance:


Public Methods

Base64 (Base64Impl* impl = NULL)
Constructs a Base64 given a Base64Impl object
~Base64 ()
Decerements the ref_cnt, and destroys the object when the ref_cnt is 0
static Base64 getInstance ()
Returns a Base64 object that provides the implementation of the base64 encoding algorithms that is installed in the Provider
static string encode (const string& data)
A static method that returns a encoded value given the string to be encoded specified by data
static string decode (const string& enc)
A static method that returns a decoded value given the string to be decoded specified by enc

Inherited from ref_ptr:

Public Methods

ref_ptr & operator=(const ref_ptr& rhs)
T* operator->() const
operator void*() const
T* get() const

Documentation

A Base64 object is a reference-count pointer that wraps a Base64Impl object.
Usage:
try {
string mesg = "hello there";
string enc = Base64::encode(mesg);
string data = Base64::decode(enc);
} catch(Exception &ex) {.....}

or Another Usage:
try {
Base64 encoder = Base64::getInstance();

encoder->encodeInit();
encoder->encodeUpdate("hello");
encoder->encodeUpdate(" ");
encoder->encodeUpdate("there");

string enc = encoder->encode();

Base64 decoder = Base64::getInstance();

decoder->decodeInit();
decoder->decodeUpdate(enc);
decoder->decodeInit();
decoder->encodeUpdate(enc);

string data = decoder->decode();
} catch(Exception &ex) {.....}
Base64(Base64Impl* impl = NULL)
Constructs a Base64 given a Base64Impl object. Typically the getInstance() method is used to create an instance of this class rather than the constructor.
Parameters:
impl - wrapped Base64Impl object
See Also:
Base64Impl
getInstance()
ref_ptr

~Base64()
Decerements the ref_cnt, and destroys the object when the ref_cnt is 0.
See Also:
ref_ptr

static Base64 getInstance()
Returns a Base64 object that provides the implementation of the base64 encoding algorithms that is installed in the Provider.
Throws:
Error if provider is not installed
Returns:
A Base64 object
See Also:
getProvider()
getBase64()

static string encode(const string& data)
A static method that returns a encoded value given the string to be encoded specified by data.
Throws:
Error if provider has not been installed
Parameters:
data - string to be encoded
See Also:
getInstance()
encodeInit()
encodeUpdate(string)
encode()

static string decode(const string& enc)
A static method that returns a decoded value given the string to be decoded specified by enc.
Throws:
Error if provider has not been installed
SecurityException if decoding fails
Parameters:
enc - string to be decoded
See Also:
getInstance()
decodeInit()
decodeUpdate(string)
decode()


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari Xiang Sun
Version:
1.1 00/05/01
See Also:
ref_ptr
Base64Impl
Provider
getBase64

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de