DWFCore::DWFDigest Class Reference

#include "dwfcore/Digest.h"

Inheritance diagram for DWFCore::DWFDigest:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

The digest computes a one-way hash given a sequence of bytes.

Since:
1.2
This provides the interface for all digest algorithms.

Definition at line 54 of file Digest.h.

Public Member Functions

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


Constructor & Destructor Documentation

virtual _DWFCORE_API DWFCore::DWFDigest::~DWFDigest  )  throw () [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 65 of file Digest.h.


Member Function Documentation

virtual _DWFCORE_API DWFString DWFCore::DWFDigest::digest  )  throw ( DWFException ) [pure 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 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.

virtual _DWFCORE_API DWFString DWFCore::DWFDigest::digestBase64  )  throw ( DWFException ) [pure 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 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.

virtual _DWFCORE_API size_t DWFCore::DWFDigest::digestRawBytes unsigned char *&  rpBytes  )  throw ( DWFException ) [pure 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 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.

virtual _DWFCORE_API bool DWFCore::DWFDigest::isProgressive  )  throw () [pure 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 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.

virtual _DWFCORE_API void DWFCore::DWFDigest::reset  )  throw () [pure virtual]
 

Reset the digest for a new computation.

Exceptions:
None 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.

virtual _DWFCORE_API void DWFCore::DWFDigest::update const char *  pBuffer,
size_t  nBytes
throw ( DWFException ) [pure 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 

Implemented in DWFCore::DWFMD5Digest, and DWFCore::DWFSHA1Digest.


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