diff options
author | lloyd <[email protected]> | 2010-10-12 19:41:37 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-12 19:41:37 +0000 |
commit | ff2210b035a1598bf99e18a578ff075bece8fbe5 (patch) | |
tree | 4efe3a23daac9e2cd8b9f2b794d95089ba4cdfb2 /src/block/aes/aes.cpp | |
parent | e7e3af16a3540e1d7a84e085aa1ea7c55f627930 (diff) |
Use size_t rather than u32bit for the blocks argument of encrypt_n
Diffstat (limited to 'src/block/aes/aes.cpp')
-rw-r--r-- | src/block/aes/aes.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp index f2f1bc9e5..66f9c5eb1 100644 --- a/src/block/aes/aes.cpp +++ b/src/block/aes/aes.cpp @@ -412,14 +412,14 @@ const u32bit TD[1024] = { /* * AES Encryption */ -void AES::encrypt_n(const byte in[], byte out[], u32bit blocks) const +void AES::encrypt_n(const byte in[], byte out[], size_t blocks) const { const u32bit* TE0 = TE; const u32bit* TE1 = TE + 256; const u32bit* TE2 = TE + 512; const u32bit* TE3 = TE + 768; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { u32bit T0 = load_be<u32bit>(in, 0) ^ EK[0]; u32bit T1 = load_be<u32bit>(in, 1) ^ EK[1]; @@ -529,14 +529,14 @@ void AES::encrypt_n(const byte in[], byte out[], u32bit blocks) const /* * AES Decryption */ -void AES::decrypt_n(const byte in[], byte out[], u32bit blocks) const +void AES::decrypt_n(const byte in[], byte out[], size_t blocks) const { const u32bit* TD0 = TD; const u32bit* TD1 = TD + 256; const u32bit* TD2 = TD + 512; const u32bit* TD3 = TD + 768; - for(u32bit i = 0; i != blocks; ++i) + for(size_t i = 0; i != blocks; ++i) { u32bit T0 = load_be<u32bit>(in, 0) ^ DK[0]; u32bit T1 = load_be<u32bit>(in, 1) ^ DK[1]; |