ZStreamR_SHA1 Class Reference

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

#include <ZStream_SHA1.h>

Inheritance diagram for ZStreamR_SHA1:

ZStreamR List of all members.

Public Member Functions

 ZStreamR_SHA1 (uint8 oDigest[20], 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 SHA1 hashes data read through it.


Constructor & Destructor Documentation

ZStreamR_SHA1::ZStreamR_SHA1 ( uint8  oDigest[20],
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[20];
ZStreamR_SHA1(theDigest, sourceStream).Read(dest, destSize);


Member Function Documentation

size_t ZStreamR_SHA1::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