openMSX
|
Public Member Functions | |
uint8_t * | getData (size_t offset, size_t) override |
Return the requested portion of the to-be-hashed data block. | |
bool | isCacheStillValid (time_t &) override |
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. | |
Public Attributes | |
uint8_t * | buffer |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::TTData | |
~TTData ()=default | |
Definition at line 9 of file TigerTree_test.cc.
|
inlineoverridevirtual |
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.
Implements openmsx::TTData.
Definition at line 11 of file TigerTree_test.cc.
References buffer.
|
inlineoverridevirtual |
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.
Implements openmsx::TTData.
Definition at line 16 of file TigerTree_test.cc.
uint8_t* TTTestData::buffer |
Definition at line 21 of file TigerTree_test.cc.
Referenced by getData(), and TEST_CASE().