ZStreamW_SHA1 Class Reference

A write filter stream that SHA1 hashes data written through it. More...

#include <ZStream_SHA1.h>

Inheritance diagram for ZStreamW_SHA1:

ZStreamW List of all members.

Public Member Functions

 ZStreamW_SHA1 (uint8 oDigest[20], const ZStreamW &iStreamSink)
 Constructor for use inline.

Detailed Description

A write filter stream that SHA1 hashes data written through it.


Constructor & Destructor Documentation

ZStreamW_SHA1::ZStreamW_SHA1 ( uint8  oDigest[20],
const ZStreamW iStreamSink 
)

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 ZStreamW is already being used to write some data, but for which we would like to gather a digest. e.g. going from this:

destStream.Write(source, sourceSize);
to this:
uint8 theDigest[20];
ZStreamW_SHA1(theDigest, destStream).Write(source, sourceSize);

It can also be used to simply digest a block of data in memory, by passing a temporary ZStreamW_Null as the destination stream:

uint8 theDigest[20];
ZStreamW_SHA1(theDigest, ZStreamW_Null()).Write(source, sourceSize);


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