#include <ZStream_SHA1.h>
Inheritance diagram for ZStreamW_SHA1:
Public Member Functions | |
ZStreamW_SHA1 (uint8 oDigest[20], const ZStreamW &iStreamSink) | |
Constructor for use inline. |
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);
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);