ZStreamW_MD5 Class Reference

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

#include <ZStream_MD5.h>

Inheritance diagram for ZStreamW_MD5:

ZStreamW List of all members.

Public Member Functions

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

Detailed Description

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


Constructor & Destructor Documentation

ZStreamW_MD5::ZStreamW_MD5 ( uint8  oDigest[16],
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[16];
ZStreamW_MD5(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[16];
ZStreamW_MD5(theDigest, ZStreamW_Null()).Write(source, sourceSize);


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