diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-09 07:39:35 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-15 16:44:23 +0200 |
commit | 9ad1a518574b9afed3e66a1e1658ead1d3d7ce54 (patch) | |
tree | 357e837d9111fdec2530a750ce323a80c0b23183 /src/crypto/sha1.h | |
parent | 73fc922ed64333d45f18d8a448f30cfa2ae0281e (diff) |
crypto: bytes counts are 64 bit
Byte counts for SHA256, SHA512, SHA1 and RIPEMD160 must be 64 bits.
`size_t` has a different size per platform, causing divergent results
when hashing more than 4GB of data.
Diffstat (limited to 'src/crypto/sha1.h')
-rw-r--r-- | src/crypto/sha1.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h index 7b2a21bc6c..8fb20810be 100644 --- a/src/crypto/sha1.h +++ b/src/crypto/sha1.h @@ -14,7 +14,7 @@ class CSHA1 private: uint32_t s[5]; unsigned char buf[64]; - size_t bytes; + uint64_t bytes; public: static const size_t OUTPUT_SIZE = 20; |