diff options
author | MacroFake <falke.marco@gmail.com> | 2022-06-10 12:02:12 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-07-20 15:34:36 +0200 |
commit | faf9accd662974a69390213fee1b5c6237846b42 (patch) | |
tree | 987a4d2f3ab4898e5eaac32b267174b9e48ee42a /src/crypto | |
parent | faa5425629d35708326b255570c51139aef0c8c4 (diff) |
Use HashWriter where possible
Diffstat (limited to 'src/crypto')
-rw-r--r-- | src/crypto/muhash.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/muhash.cpp b/src/crypto/muhash.cpp index 57ed357645..7d14b7938e 100644 --- a/src/crypto/muhash.cpp +++ b/src/crypto/muhash.cpp @@ -298,7 +298,7 @@ void Num3072::ToBytes(unsigned char (&out)[BYTE_SIZE]) { Num3072 MuHash3072::ToNum3072(Span<const unsigned char> in) { unsigned char tmp[Num3072::BYTE_SIZE]; - uint256 hashed_in = (CHashWriter(SER_DISK, 0) << in).GetSHA256(); + uint256 hashed_in{(HashWriter{} << in).GetSHA256()}; ChaCha20(hashed_in.data(), hashed_in.size()).Keystream(tmp, Num3072::BYTE_SIZE); Num3072 out{tmp}; @@ -318,7 +318,7 @@ void MuHash3072::Finalize(uint256& out) noexcept unsigned char data[Num3072::BYTE_SIZE]; m_numerator.ToBytes(data); - out = (CHashWriter(SER_DISK, 0) << data).GetSHA256(); + out = (HashWriter{} << data).GetSHA256(); } MuHash3072& MuHash3072::operator*=(const MuHash3072& mul) noexcept |