namespace Akenti class MessageDigestImpl

This abstract class provides applications with the interface of a message digest algorithm, such as MD5 or SHA1

Inheritance:


Public Methods

virtual ~MessageDigestImpl ()
Deletes this object
virtual string getAlgorithm () const
Returns a string that identifies the algorithm, independent of implementation details
void update (const string& data, int offset, int len)
Updates the digest using the specified number of bytes, starting at the specified offset in the data string
void update (const string& data)
Updates the digest using the specified string of bytes
virtual string digest ()
Completes the hash computation
virtual void reset ()
Resets the digest to the initial state of no data

Protected Methods

MessageDigestImpl ()
Constructs this object
virtual void doUpdate (const string& data, int offset, int len)
Updates the digest using the specified number of bytes, starting at the specified offset

Documentation

This abstract class provides applications with the interface of a message digest algorithm, such as MD5 or SHA1. It also provides some of the functionality. The rest of the functionality is to be provided by the subclass implementors. Typically the clients will not deal with an instance of this class directly. Instead they interact with the MessageDigest reference-count pointer.

A MessageDigestImpl object starts out in an initial state containing no data. Data is added to the digest object using the update methods. At any point the reset method can be called to reset the digest to the initial state of no data. Once all the data has been updated, one of the digest methods should be called to complete the hash computation. After digest has been called, the MessageDigestImpl object is reset to its initialized state.

virtual ~MessageDigestImpl()
Deletes this object

virtual string getAlgorithm() const
Returns a string that identifies the algorithm, independent of implementation details. The name should be a standard name such as "MD5".
Returns:
name of the algorithm

void update(const string& data, int offset, int len)
Updates the digest using the specified number of bytes, starting at the specified offset in the data string.
Throws:
Error if input buffer too short
Parameters:
data - input string of bytes.
offset - the offset in data to start from
len - the number of bytes to use starting at offset.
See Also:
doUpdate(const string&)

void update(const string& data)
Updates the digest using the specified string of bytes.
Parameters:
data - string to be updated.
See Also:
doUpdate(const string&)

virtual string digest()
Completes the hash computation. Subclass implementors must reset the digest after this call is made.
Returns:
a string of bytes for the resulting hash value.

virtual void reset()
Resets the digest to the initial state of no data

MessageDigestImpl()
Constructs this object.

virtual void doUpdate(const string& data, int offset, int len)
Updates the digest using the specified number of bytes, starting at the specified offset. Subclass implementors need not do any error checking since the update methods make sure that the arguments are valid.
Parameters:
input - string of bytes.
offset - the offset to start from.
len - the number of bytes to use starting at offset.
See Also:
update(const string&)
update(const string&, int, int)


Direct child classes:
OpenSSLMessageDigestImpl
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01
See Also:
MessageDigest
getProvider()
getMessageDigest(const string&)
Error

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