diff options
Diffstat (limited to 'src/constructs/aont/package.cpp')
-rw-r--r-- | src/constructs/aont/package.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/constructs/aont/package.cpp b/src/constructs/aont/package.cpp index 4d92a789c..4d46f6b61 100644 --- a/src/constructs/aont/package.cpp +++ b/src/constructs/aont/package.cpp @@ -46,13 +46,13 @@ void aont_package(RandomNumberGenerator& rng, clear_mem(final_block, BLOCK_SIZE); // XOR the hash blocks into the final block - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { const size_t left = std::min<size_t>(BLOCK_SIZE, input_len - BLOCK_SIZE * i); zeroise(buf); - copy_mem(&buf[0], output + BLOCK_SIZE * i, left); + copy_mem(&buf[0], output + (BLOCK_SIZE * i), left); for(size_t j = 0; j != sizeof(i); ++j) buf[BLOCK_SIZE - 1 - j] ^= get_byte(sizeof(i)-1-j, i); @@ -94,13 +94,13 @@ void aont_unpackage(BlockCipher* cipher, const size_t blocks = ((input_len - 1) / BLOCK_SIZE); // XOR the blocks into the package key bits - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { const size_t left = std::min<size_t>(BLOCK_SIZE, input_len - BLOCK_SIZE * (i+1)); zeroise(buf); - copy_mem(&buf[0], input + BLOCK_SIZE * i, left); + copy_mem(&buf[0], input + (BLOCK_SIZE * i), left); for(size_t j = 0; j != sizeof(i); ++j) buf[BLOCK_SIZE - 1 - j] ^= get_byte(sizeof(i)-1-j, i); |