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/sha512.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/sha512.h')
-rw-r--r-- | src/crypto/sha512.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h index f1f17caf90..614681fae2 100644 --- a/src/crypto/sha512.h +++ b/src/crypto/sha512.h @@ -14,7 +14,7 @@ class CSHA512 private: uint64_t s[8]; unsigned char buf[128]; - size_t bytes; + uint64_t bytes; public: static const size_t OUTPUT_SIZE = 64; |