class OpenSSLBase64Impl

This class is the subclass of Base64Impl which implements the functionality of Base64 data encoding and decoding.

Inheritance:


Public Methods

[more] OpenSSLBase64Impl ()
Constructs this object.
[more] ~OpenSSLBase64Impl ()
Destroys this object

Protected Methods

[more]void doEncodeInit ()
Initializes the buffer for encoding
[more]void doEncodeUpdate (const string& data, int offset, int len)
Updates engine for encoding from the input data string starting at the offset and taking the specified number of bytes
[more]string doEncode ()
Encodes all the data accumlated in the buffer and returns the encoded string.
[more]void doDecodeInit ()
Initializes the engine for decoding.
[more]void doDecodeUpdate (const string& enc, int offset, int len)
Updates engine for decoding from the input data string starting at the offset and taking the specified number of bytes
[more]string doDecode ()
Completes the decode procedure, returns decoded data in string.


Documentation

This class is the subclass of Base64Impl which implements the functionality of Base64 data encoding and decoding. This class contains a data buffer and an openssl EVP-encode-context structure. The methods are implemented by calls to the openssl library. The use model for this class is to intialize the object for either encoding or decoding which empties the buffer and sets the context. Data is then appended to the buffer by one or more update calls. Finally a doEncode or doDecode method is called which en/decodes the accumlated data and returns the en/decoded string.

o OpenSSLBase64Impl()
Constructs this object.

See Also:
Base64Impl()

o ~OpenSSLBase64Impl()
Destroys this object

ovoid doEncodeInit()
Initializes the buffer for encoding

ovoid doEncodeUpdate(const string& data, int offset, int len)
Updates engine for encoding from the input data string starting at the offset and taking the specified number of bytes

Parameters:
data - string used to update the engine
offset - int begin index in data
len - int number of bytes used to update the engine

ostring doEncode()
Encodes all the data accumlated in the buffer and returns the encoded string. It does not reset the data buffer.

Returns:
a Base64 enoded string of all the accumlated data.

ovoid doDecodeInit()
Initializes the engine for decoding.

ovoid doDecodeUpdate(const string& enc, int offset, int len)
Updates engine for decoding from the input data string starting at the offset and taking the specified number of bytes

Comment: will not work if the encoded string 'enc' is broken up and this function is called several times to decode the string.

Parameters:
data - string used to update the engine
offset - int begin index
len - int number of bytes used to update the engine

ostring doDecode()
Completes the decode procedure, returns decoded data in string.

Throws:
SecurityException if decoding failed
Returns:
The Base64 decoded data as a string


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.