ZStreamR_MD5 Class Reference

A read filter stream that MD5 hashes data read through it. More...

#include <ZStream_MD5.h>

Inheritance diagram for ZStreamR_MD5:

ZStreamR List of all members.

Public Member Functions

 ZStreamR_MD5 (uint8 oDigest[16], const ZStreamR &iStreamSource)
 Constructor for use inline.
virtual size_t Imp_CountReadable ()
 Returns the number of bytes guaranteed to be readable without blocking.

Detailed Description

A read filter stream that MD5 hashes data read through it.


Constructor & Destructor Documentation

ZStreamR_MD5::ZStreamR_MD5 ( uint8  oDigest[16],
const ZStreamR iStreamSource 
)

Constructor for use inline.

This constructor remembers the address of oDigest, and when destroyed will place the digest in that array. This constructor is useful when a ZStreamR is already being used to read some data, but for which we would like to gather a digest. e.g. going from this:

sourceStream.Read(dest, destSize);
to this:
uint8 theDigest[16];
ZStreamR_MD5(theDigest, sourceStream).Read(dest, destSize);


Member Function Documentation

size_t ZStreamR_MD5::Imp_CountReadable (  )  [virtual]

Returns the number of bytes guaranteed to be readable without blocking.

If the stream does not or cannot know this information it should return zero. A zero return thus does not mean no data is available, simply that a subsequent Read or Skip may block indefinitely.

Reimplemented from ZStreamR.


The documentation for this class was generated from the following files:
Generated on Thu Jul 26 11:22:03 2007 for ZooLib by  doxygen 1.4.7