DWFCore::DWFMD5Digest Class Reference

#include "dwfcore/Digest.h"

Inheritance diagram for DWFCore::DWFMD5Digest:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFMD5Digest:

Collaboration graph
[legend]
List of all members.

Detailed Description

This class computes a one-way hash given a sequence of bytes using the MD5 algorithm.

Since:
1.2
This provides the interface for the MD5 digest algorithms.
Examples:

Digest/main.cpp.

Definition at line 161 of file Digest.h.

Public Member Functions

_DWFCORE_API DWFMD5Digest () throw ()
virtual _DWFCORE_API ~DWFMD5Digest () throw ()
virtual _DWFCORE_API void update (const char *pBuffer, size_t nBytes) throw ( DWFException )
virtual _DWFCORE_API bool isProgressive () throw ()
virtual _DWFCORE_API DWFString digest () throw ( DWFException )
virtual _DWFCORE_API size_t digestRawBytes (unsigned char *&rpBytes) throw ( DWFException )
virtual _DWFCORE_API DWFString digestBase64 () throw ( DWFException )
virtual _DWFCORE_API void reset () throw ()


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFMD5Digest::DWFMD5Digest  )  throw ()
 

Constructor

Exceptions:
None 

virtual _DWFCORE_API DWFCore::DWFMD5Digest::~DWFMD5Digest  )  throw () [virtual]
 

Destructor

Exceptions:
None 


Member Function Documentation

virtual _DWFCORE_API DWFString DWFCore::DWFMD5Digest::digest  )  throw ( DWFException ) [virtual]
 

Get the digest of all bytes read so far, in hexadecimal characters. For digest's that are not progressive this should not be called until all bytes have been read. Non-progressive digests will always finalize the computation on this call.

Returns:
A string containing the digest. The length depends on the exact algorithm.
Exceptions:
None 

Implements DWFCore::DWFDigest.

virtual _DWFCORE_API DWFString DWFCore::DWFMD5Digest::digestBase64  )  throw ( DWFException ) [virtual]
 

Get the digest of all bytes read so far, in a base-64 encoded string. For digest's that are not progressive this should not be called until all bytes have been read. Non-progressive digests will always finalize the computation on this call.

Returns:
A string containing the digest in base-64 encoding. The length depends on the exact algorithm.
Exceptions:
None 

Implements DWFCore::DWFDigest.

virtual _DWFCORE_API size_t DWFCore::DWFMD5Digest::digestRawBytes unsigned char *&  rpBytes  )  throw ( DWFException ) [virtual]
 

Get the digest of all bytes read so far, in raw bytes. For digest's that are not progressive this should not be called until all bytes have been read. Non-progressive digests will always finalize the computation on this call.

Parameters:
rpBytes The array of bytes will be allocated and returned via this pointer. It should be initialized to NULL before calling this.
Returns:
A character array containing the raw bytes, that the caller must delete using DWFCORE_FREE_MEMORY(), and the length of the array. The array will not have a terminating null characters.
Exceptions:
None 

Implements DWFCore::DWFDigest.

virtual _DWFCORE_API bool DWFCore::DWFMD5Digest::isProgressive  )  throw () [virtual]
 

Determine if the digest of the bytes seen so far can be retrieved during the computation, without affecting the computation. If it is not progressive then digest() should not be called until all bytes have passed throught the computation.

Exceptions:
None 

Implements DWFCore::DWFDigest.

virtual _DWFCORE_API void DWFCore::DWFMD5Digest::reset  )  throw () [virtual]
 

Reset the digest for a new computation.

Exceptions:
None 

Implements DWFCore::DWFDigest.

virtual _DWFCORE_API void DWFCore::DWFMD5Digest::update const char *  pBuffer,
size_t  nBytes
throw ( DWFException ) [virtual]
 

Update the digest computation with the new bytes.

Parameters:
pBuffer The buffer holding the latest sequence of bytes.
nBytes The number of bytes in the buffer.
Exceptions:
DWFException 

Implements DWFCore::DWFDigest.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:35 2009 for Autodesk DWF Core Library by  doxygen 1.4.5