diff options
author | Jack Lloyd <[email protected]> | 2018-09-30 16:45:20 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-09-30 16:45:20 -0400 |
commit | 38f053a5f8cb1ca351ba52d76c15491d63fd3eb0 (patch) | |
tree | 13c06b095059af302b8e0d9562a4aa7a9a6e73b1 /src/lib/block/idea | |
parent | e9ba0d9cdf0726b357d7aeca14ef43f1d10be1e8 (diff) |
Fix some MSVC warnings
Diffstat (limited to 'src/lib/block/idea')
-rw-r--r-- | src/lib/block/idea/idea.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/block/idea/idea.cpp b/src/lib/block/idea/idea.cpp index de153e2c5..d6380368d 100644 --- a/src/lib/block/idea/idea.cpp +++ b/src/lib/block/idea/idea.cpp @@ -197,7 +197,7 @@ void IDEA::key_schedule(const uint8_t key[], size_t) for(size_t off = 0; off != 48; off += 8) { for(size_t i = 0; i != 8; ++i) - m_EK[off+i] = K[i/4] >> (48-16*(i % 4)); + m_EK[off+i] = static_cast<uint16_t>(K[i/4] >> (48-16*(i % 4))); const uint64_t Kx = (K[0] >> 39); const uint64_t Ky = (K[1] >> 39); @@ -207,7 +207,7 @@ void IDEA::key_schedule(const uint8_t key[], size_t) } for(size_t i = 0; i != 4; ++i) - m_EK[48+i] = K[i/4] >> (48-16*(i % 4)); + m_EK[48+i] = static_cast<uint16_t>(K[i/4] >> (48-16*(i % 4))); m_DK[0] = mul_inv(m_EK[48]); m_DK[1] = -m_EK[49]; |