diff options
author | lloyd <[email protected]> | 2010-12-13 22:06:59 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-12-13 22:06:59 +0000 |
commit | aa8a0c19ec2156864d16bfe4b82fce4f2203c08d (patch) | |
tree | c6de672209e59214c91f29a702339c35d518c459 /src/hash/keccak | |
parent | d73929a5ec894625e7e4cb82c1a22bea4a0e7a26 (diff) |
Avoid more VC warnings
Diffstat (limited to 'src/hash/keccak')
-rw-r--r-- | src/hash/keccak/keccak.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hash/keccak/keccak.cpp b/src/hash/keccak/keccak.cpp index 37fdc0d86..841c8875d 100644 --- a/src/hash/keccak/keccak.cpp +++ b/src/hash/keccak/keccak.cpp @@ -104,7 +104,7 @@ void keccak_f_1600(u64bit A[25]) Keccak_1600::Keccak_1600(size_t output_bits) : output_bits(output_bits), bitrate(1600 - 2*output_bits), - diversifier(output_bits / 8), + diversifier(static_cast<byte>(output_bits / 8)), S(25), S_pos(0) { @@ -179,7 +179,10 @@ void Keccak_1600::add_data(const byte input[], size_t length) void Keccak_1600::final_result(byte output[]) { - const byte padding[4] = { 0x01, diversifier, bitrate / 8, 0x01 }; + const byte padding[4] = { 0x01, + diversifier, + static_cast<byte>(bitrate / 8), + 0x01 }; add_data(padding, sizeof(padding)); |