aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes_intel
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/aes_intel
parentc59d960db6d69bd9c479ec674768b7ec371830b5 (diff)
More size_t
Diffstat (limited to 'src/block/aes_intel')
-rw-r--r--src/block/aes_intel/aes_intel.cpp24
-rw-r--r--src/block/aes_intel/aes_intel.h12
2 files changed, 18 insertions, 18 deletions
diff --git a/src/block/aes_intel/aes_intel.cpp b/src/block/aes_intel/aes_intel.cpp
index c52f3fcd3..d03767e72 100644
--- a/src/block/aes_intel/aes_intel.cpp
+++ b/src/block/aes_intel/aes_intel.cpp
@@ -103,7 +103,7 @@ __m128i aes_256_key_expansion(__m128i key, __m128i key2)
/*
* AES-128 Encryption
*/
-void AES_128_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_128_Intel::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -155,7 +155,7 @@ void AES_128_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
@@ -179,7 +179,7 @@ void AES_128_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
/*
* AES-128 Decryption
*/
-void AES_128_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_128_Intel::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -231,7 +231,7 @@ void AES_128_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
@@ -313,7 +313,7 @@ void AES_128_Intel::clear()
/*
* AES-192 Encryption
*/
-void AES_192_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_192_Intel::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -369,7 +369,7 @@ void AES_192_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
@@ -395,7 +395,7 @@ void AES_192_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
/*
* AES-192 Decryption
*/
-void AES_192_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_192_Intel::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -451,7 +451,7 @@ void AES_192_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
@@ -529,7 +529,7 @@ void AES_192_Intel::clear()
/*
* AES-256 Encryption
*/
-void AES_256_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_256_Intel::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -589,7 +589,7 @@ void AES_256_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
@@ -617,7 +617,7 @@ void AES_256_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
/*
* AES-256 Decryption
*/
-void AES_256_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
+void AES_256_Intel::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
const __m128i* in_mm = (const __m128i*)in;
__m128i* out_mm = (__m128i*)out;
@@ -677,7 +677,7 @@ void AES_256_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
out_mm += 4;
}
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
__m128i B = _mm_loadu_si128(in_mm + i);
diff --git a/src/block/aes_intel/aes_intel.h b/src/block/aes_intel/aes_intel.h
index 34ffcf9c6..43e8f2f0e 100644
--- a/src/block/aes_intel/aes_intel.h
+++ b/src/block/aes_intel/aes_intel.h
@@ -20,8 +20,8 @@ class BOTAN_DLL AES_128_Intel : public BlockCipher
public:
size_t parallelism() const { return 4; }
- 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;
void clear();
std::string name() const { return "AES-128"; }
@@ -42,8 +42,8 @@ class BOTAN_DLL AES_192_Intel : public BlockCipher
public:
size_t parallelism() const { return 4; }
- 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;
void clear();
std::string name() const { return "AES-192"; }
@@ -64,8 +64,8 @@ class BOTAN_DLL AES_256_Intel : public BlockCipher
public:
size_t parallelism() const { return 4; }
- 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;
void clear();
std::string name() const { return "AES-256"; }