aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/serpent_ia32
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 00:56:15 +0000
committerlloyd <[email protected]>2010-10-13 00:56:15 +0000
commit6e706bfefa04fc28d6c204442ca45982993dc550 (patch)
treec3a151b6ce91cb5add058b224a925e4f3b8cfb5d /src/block/serpent_ia32
parentc59d960db6d69bd9c479ec674768b7ec371830b5 (diff)
More size_t
Diffstat (limited to 'src/block/serpent_ia32')
-rw-r--r--src/block/serpent_ia32/serp_ia32.cpp10
-rw-r--r--src/block/serpent_ia32/serp_ia32.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/block/serpent_ia32/serp_ia32.cpp b/src/block/serpent_ia32/serp_ia32.cpp
index e969f5235..28a605d12 100644
--- a/src/block/serpent_ia32/serp_ia32.cpp
+++ b/src/block/serpent_ia32/serp_ia32.cpp
@@ -46,7 +46,7 @@ void botan_serpent_ia32_key_schedule(u32bit ks[140]);
*/
void Serpent_IA32::encrypt_n(const byte in[], byte out[], u32bit blocks) const
{
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
botan_serpent_ia32_encrypt(in, out, this->get_round_keys());
in += BLOCK_SIZE;
@@ -57,9 +57,9 @@ void Serpent_IA32::encrypt_n(const byte in[], byte out[], u32bit blocks) const
/*
* Serpent Decryption
*/
-void Serpent_IA32::decrypt_n(const byte in[], byte out[], u32bit blocks) const
+void Serpent_IA32::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
botan_serpent_ia32_decrypt(in, out, this->get_round_keys());
in += BLOCK_SIZE;
@@ -73,8 +73,8 @@ void Serpent_IA32::decrypt_n(const byte in[], byte out[], u32bit blocks) const
void Serpent_IA32::key_schedule(const byte key[], u32bit length)
{
SecureVector<u32bit> W(140);
- for(u32bit j = 0; j != length / 4; ++j)
- W[j] = load_le<u32bit>(key, j);
+ for(size_t i = 0; i != length / 4; ++i)
+ W[i] = load_le<u32bit>(key, i);
W[length / 4] |= u32bit(1) << ((length%4)*8);
botan_serpent_ia32_key_schedule(W);
diff --git a/src/block/serpent_ia32/serp_ia32.h b/src/block/serpent_ia32/serp_ia32.h
index 229a2042b..cd103c130 100644
--- a/src/block/serpent_ia32/serp_ia32.h
+++ b/src/block/serpent_ia32/serp_ia32.h
@@ -18,8 +18,8 @@ namespace Botan {
class BOTAN_DLL Serpent_IA32 : public Serpent
{
public:
- void encrypt_n(const byte in[], byte out[], u32bit blocks) const;
- void decrypt_n(const byte in[], byte out[], u32bit blocks) const;
+ void encrypt_n(const byte in[], byte out[], size_t blocks) const;
+ void decrypt_n(const byte in[], byte out[], size_t blocks) const;
BlockCipher* clone() const { return new Serpent_IA32; }
private: