diff options
author | lloyd <[email protected]> | 2009-12-23 01:41:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-12-23 01:41:08 +0000 |
commit | 51b3e9a653af23c00efc27c05045a74211e7fd5c (patch) | |
tree | 81b28e4e014992c1ea54f07d13be9a5cd2921113 /src/hash | |
parent | 4b0e73bef1bc729219c7b4446e33644c170b0922 (diff) |
Use a u32bit for the length argument to ubi_512. That value cannot possibly
be larger than 4294967232 because you can give at most 2^32-1 bytes of
data at a time to Skein_512::add_data, and Skein always needs to buffer at
least one byte.
Diffstat (limited to 'src/hash')
-rw-r--r-- | src/hash/skein/skein_512.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index 2c6aa121c..cb4b7a7a2 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -27,11 +27,11 @@ enum type_code { SKEIN_OUTPUT = 63 }; -void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u64bit msg_len) +void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u32bit msg_len) { do { - const u64bit to_proc = std::min<u64bit>(msg_len, 64); + const u32bit to_proc = std::min<u32bit>(msg_len, 64); T[0] += to_proc; u64bit M[8] = { 0 }; |