diff options
author | Jack Lloyd <[email protected]> | 2017-08-31 08:23:30 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-31 08:23:30 -0400 |
commit | 7fecb1254232311d5f2ca62f9cda1e12a4b2558c (patch) | |
tree | 2e2cd8ef8ca016310d4cc9aa6bee7abc96c39e2f /src/lib/modes | |
parent | df4287c3c763de14b262ed39d54b3de552adbefb (diff) |
More MSVC warnings fixes
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/ccm/ccm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/modes/aead/ccm/ccm.cpp b/src/lib/modes/aead/ccm/ccm.cpp index db0d2d58b..b7f81e5ab 100644 --- a/src/lib/modes/aead/ccm/ccm.cpp +++ b/src/lib/modes/aead/ccm/ccm.cpp @@ -136,7 +136,8 @@ secure_vector<uint8_t> CCM_Mode::format_b0(size_t sz) { secure_vector<uint8_t> B0(CCM_BS); - const uint8_t b_flags = (m_ad_buf.size() ? 64 : 0) + (((tag_size()/2)-1) << 3) + (L()-1); + const uint8_t b_flags = + static_cast<uint8_t>((m_ad_buf.size() ? 64 : 0) + (((tag_size()/2)-1) << 3) + (L()-1)); B0[0] = b_flags; copy_mem(&B0[1], m_nonce.data(), m_nonce.size()); @@ -149,7 +150,7 @@ secure_vector<uint8_t> CCM_Mode::format_c0() { secure_vector<uint8_t> C(CCM_BS); - const uint8_t a_flags = L()-1; + const uint8_t a_flags = static_cast<uint8_t>(L() - 1); C[0] = a_flags; copy_mem(&C[1], m_nonce.data(), m_nonce.size()); |