aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/serpent_ia32
diff options
context:
space:
mode:
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: