Introduce a distinct class name for the MD5 Hasher

This commit is contained in:
hashlag
2025-08-09 16:58:02 +03:00
parent c4ddd78d59
commit f19ea0bc1c
2 changed files with 14 additions and 14 deletions

View File

@@ -150,7 +150,7 @@ private:
}
};
struct Hash
struct Md5Hash
{
std::string ToHexString() const
{
@@ -170,10 +170,10 @@ struct Hash
std::array<uint8_t, 16> RawDigest;
};
class Hasher
class Md5Hasher
{
public:
Hasher()
Md5Hasher()
: BlockSize_(0)
, Word_(0)
, WordBytesPacked_(0)
@@ -188,7 +188,7 @@ public:
MessageSizeBytes_ += UpdateImpl(begin, end);
}
Hash Finish()
Md5Hash Finish()
{
uint64_t messageSizeBytesMod64 = MessageSizeBytes_ % 64;
@@ -228,7 +228,7 @@ public:
UpdateImpl(encodedMessageSizeBits,
encodedMessageSizeBits + std::size(encodedMessageSizeBits));
Hash result;
Md5Hash result;
int_fast8_t i = 0;
for (int_fast8_t reg = 0; reg < 4; ++reg)