class OpenSSLMessageDigestImpl

This class is instantiated from superclass MessageDigestImpl and uses hash algorithms such as MD5 or SHA1 to produce a fixed length output from an arbitrary-length input messageIt wraps a ssl EVP_MD_CTX.

Inheritance:


Public Methods

[more] OpenSSLMessageDigestImpl (const string& alg)
Constructs this object with the specified algorithm.
[more] ~OpenSSLMessageDigestImpl ()
Deletes this object
[more]void reset ()
Resets the engine for further use

Protected Methods

[more]void doUpdate (const string& data, int offset, int len)
Updates the engine using the specified number of bytes, starting at the specified offset.
[more]string doDigest ()
Completes the hash computation.


Inherited from MessageDigestImpl:

Public Methods

oconst string& getAlgorithm() const
ovoid update(const string& data, int offset, int len)
ovoid update(const string& data)
ostring digest()

Protected Fields

ostring alg


Documentation

This class is instantiated from superclass MessageDigestImpl and uses hash algorithms such as MD5 or SHA1 to produce a fixed length output from an arbitrary-length input messageIt wraps a ssl EVP_MD_CTX.

o OpenSSLMessageDigestImpl(const string& alg)
Constructs this object with the specified algorithm. e.g. MD5 or SHA1.

Throws:
SecurityException if no such algorithm
Parameters:
- alg const string & the name of the algorithm
See Also:
EVP_get_digestbyname

o ~OpenSSLMessageDigestImpl()
Deletes this object

ovoid reset()
Resets the engine for further use

ovoid doUpdate(const string& data, int offset, int len)
Updates the engine using the specified number of bytes, starting at the specified offset. The user calls the update method which is implemented by the superclass which in turn calls this protected method to do the openSSL specific actions.

Throws:
Error if input buffer too short
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&)

ostring doDigest()
Completes the hash computation. You should reset the digest after this call is made.

Returns:
a string of bytes for the resulting hash value.


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

Alphabetic index HTML hierarchy of classes or Java



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