aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/ripemd160.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-09 07:39:35 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-15 16:44:23 +0200
commit9ad1a518574b9afed3e66a1e1658ead1d3d7ce54 (patch)
tree357e837d9111fdec2530a750ce323a80c0b23183 /src/crypto/ripemd160.h
parent73fc922ed64333d45f18d8a448f30cfa2ae0281e (diff)
downloadbitcoin-9ad1a518574b9afed3e66a1e1658ead1d3d7ce54.tar.xz
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/ripemd160.h')
-rw-r--r--src/crypto/ripemd160.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index 687204fdae..bd41f02508 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -14,7 +14,7 @@ class CRIPEMD160
private:
uint32_t s[5];
unsigned char buf[64];
- size_t bytes;
+ uint64_t bytes;
public:
static const size_t OUTPUT_SIZE = 20;