diff options
Diffstat (limited to 'src/block')
-rw-r--r-- | src/block/aes/aes.cpp | 5 | ||||
-rw-r--r-- | src/block/mars/mars.cpp | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp index b19699dbc..7f32d243c 100644 --- a/src/block/aes/aes.cpp +++ b/src/block/aes/aes.cpp @@ -9,9 +9,6 @@ #include <botan/loadstor.h> #include <botan/rotate.h> -#include <assert.h> -#include <stdio.h> - namespace Botan { namespace { @@ -616,7 +613,7 @@ void aes_key_schedule(const byte key[], size_t length, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000 }; - const u32bit rounds = (length / 4) + 6; + const size_t rounds = (length / 4) + 6; SecureVector<u32bit> XEK(length + 32), XDK(length + 32); diff --git a/src/block/mars/mars.cpp b/src/block/mars/mars.cpp index fa73e564f..5ee5b0f19 100644 --- a/src/block/mars/mars.cpp +++ b/src/block/mars/mars.cpp @@ -202,14 +202,14 @@ u32bit gen_mask(u32bit input) { u32bit mask = 0; - for(size_t j = 2; j != 31; ++j) + for(u32bit j = 2; j != 31; ++j) { u32bit region = (input >> (j-1)) & 0x07; if(region == 0x00 || region == 0x07) { - u32bit low = (j < 9) ? 0 : (j - 9); - u32bit high = (j < 23) ? j : 23; + const u32bit low = (j < 9) ? 0 : (j - 9); + const u32bit high = (j < 23) ? j : 23; for(u32bit k = low; k != high; ++k) { @@ -324,7 +324,7 @@ void MARS::key_schedule(const byte key[], size_t length) for(size_t i = 0; i != length / 4; ++i) T[i] = load_le<u32bit>(key, i); - T[length / 4] = length / 4; + T[length / 4] = static_cast<u32bit>(length) / 4; for(u32bit i = 0; i != 4; ++i) { |