|
virtual void | writeSum (Stream *inStream=NULL)=0 |
|
virtual bool | verifySum (Stream *inStream=NULL)=0 |
|
virtual void | resetSum ()=0 |
|
virtual const u8 * | getCurrentSum ()=0 |
|
virtual size_t | getSumSize () const =0 |
|
virtual size_t | readBytes (void *buffer, size_t inSize, bool wouldBlock=false)=0 |
|
virtual void | writeBytes (const void *buffer, size_t inSize)=0 |
|
virtual void | flushBuffer ()=0 |
|
virtual bool | isEof () const =0 |
|
virtual size_t | duplicateStream (Stream *inStream, size_t inBufferSize=1024, DuplicateStreamCallback inCallback=NULL, void *inCallbackContext=NULL) |
|
virtual size_t | duplicateStreamBytes (Stream *inStream, size_t inMaximumByteSize, size_t inBufferSize=1024, DuplicateStreamCallback inCallback=NULL, void *inCallbackContext=NULL) |
|
| Referable () |
|
void | addRef () const |
|
void | releaseRef () const |
|
size_t | getReferenceCount () const |
|
virtual void | lock () const =0 |
|
virtual void | unlock () const =0 |
|
This class calculates the sum of the data that is "read from" or "write to" this stream.
void writeData(Stream *inStream)
{
md5->writeBytes(...);
md5->writeBytes(...);
md5->writeBytes(...);
md5->writeSum();
}
void readData(Stream *inStream)
{
md5->readBytes(...);
md5->readBytes(...);
md5->readBytes(...);
if(md5->verifySum())
{
}
else
{
}
}
ChecksumStream defines an interface for the Stream with Checksum feature.
- See Also
- MD5Stream, SHA1Stream, SHA256Stream, Checksum