openMSX
|
Helper class to perform a sha1 calculation. More...
#include <sha1.hh>
Public Member Functions | |
SHA1 () | |
void | update (std::span< const uint8_t > data) |
Incrementally calculate the hash value. | |
Sha1Sum | digest () |
Get the final hash. | |
Static Public Member Functions | |
static Sha1Sum | calc (std::span< const uint8_t > data) |
Easier to use interface, if you can pass all data in one go. | |
Helper class to perform a sha1 calculation.
Basic usage:
openmsx::SHA1::SHA1 | ( | ) |
Definition at line 258 of file utils/sha1.cc.
|
static |
Easier to use interface, if you can pass all data in one go.
Definition at line 365 of file utils/sha1.cc.
References digest(), and update().
Referenced by openmsx::DeltaBlockCopy::apply(), openmsx::DeltaBlockDiff::apply(), openmsx::LastDeltaBlocks::createNullDiff(), openmsx::DeltaBlockCopy::DeltaBlockCopy(), openmsx::DeltaBlockDiff::DeltaBlockDiff(), openmsx::Rom::getOriginalSHA1(), and TEST_CASE().
Sha1Sum openmsx::SHA1::digest | ( | ) |
Get the final hash.
After this method is called, calls to update() are invalid.
Definition at line 359 of file utils/sha1.cc.
Referenced by calc(), openmsx::SectorAccessibleDisk::getSha1SumImpl(), TEST_CASE(), and TEST_CASE().
void openmsx::SHA1::update | ( | std::span< const uint8_t > | data | ) |
Incrementally calculate the hash value.
Definition at line 317 of file utils/sha1.cc.
References ranges::copy(), and subspan().
Referenced by calc(), openmsx::SectorAccessibleDisk::getSha1SumImpl(), TEST_CASE(), and TEST_CASE().