openMSX
|
The TigerTree class will query the to-be-hashed data via this abstract interface. More...
#include <TigerTree.hh>
Public Member Functions | |
virtual uint8_t * | getData (size_t offset, size_t size)=0 |
Return the requested portion of the to-be-hashed data block. | |
virtual bool | isCacheStillValid (time_t &time)=0 |
Because TTH calculation of a large file takes some time (a few 1/10s for a hard disk image) we try to cache previous calculations. | |
Protected Member Functions | |
~TTData ()=default | |
The TigerTree class will query the to-be-hashed data via this abstract interface.
This allows to e.g. fetch the data from a file.
Definition at line 43 of file TigerTree.hh.
|
protecteddefault |
|
pure virtual |
Return the requested portion of the to-be-hashed data block.
Special requirement: it should be allowed to temporarily overwrite the byte one position before the returned pointer.
Implemented in TTTestData.
|
pure virtual |
Because TTH calculation of a large file takes some time (a few 1/10s for a hard disk image) we try to cache previous calculations.
This method makes sure we don't wrongly reuse the data. E.g. after it has been modified (by openmsx or even externally).
Note that the current implementation of the caching is only suited for files. Refactor this if we ever need some different.
Implemented in TTTestData.