aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/openssl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 19:41:37 +0000
committerlloyd <[email protected]>2010-10-12 19:41:37 +0000
commitff2210b035a1598bf99e18a578ff075bece8fbe5 (patch)
tree4efe3a23daac9e2cd8b9f2b794d95089ba4cdfb2 /src/engine/openssl
parente7e3af16a3540e1d7a84e085aa1ea7c55f627930 (diff)
Use size_t rather than u32bit for the blocks argument of encrypt_n
Diffstat (limited to 'src/engine/openssl')
-rw-r--r--src/engine/openssl/ossl_bc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp
index 911d6088d..d1365d038 100644
--- a/src/engine/openssl/ossl_bc.cpp
+++ b/src/engine/openssl/ossl_bc.cpp
@@ -27,8 +27,8 @@ class EVP_BlockCipher : public BlockCipher
~EVP_BlockCipher();
private:
- 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 key_schedule(const byte[], u32bit);
std::string cipher_name;
mutable EVP_CIPHER_CTX encrypt, decrypt;
@@ -91,7 +91,7 @@ EVP_BlockCipher::~EVP_BlockCipher()
* Encrypt a block
*/
void EVP_BlockCipher::encrypt_n(const byte in[], byte out[],
- u32bit blocks) const
+ size_t blocks) const
{
int out_len = 0;
EVP_EncryptUpdate(&encrypt, out, &out_len, in, blocks * BLOCK_SIZE);
@@ -101,7 +101,7 @@ void EVP_BlockCipher::encrypt_n(const byte in[], byte out[],
* Decrypt a block
*/
void EVP_BlockCipher::decrypt_n(const byte in[], byte out[],
- u32bit blocks) const
+ size_t blocks) const
{
int out_len = 0;
EVP_DecryptUpdate(&decrypt, out, &out_len, in, blocks * BLOCK_SIZE);
@@ -214,7 +214,8 @@ OpenSSL_Engine::find_block_cipher(const SCAN_Name& request,
#if !defined(OPENSSL_NO_RC5)
if(request.algo_name() == "RC5")
if(request.arg_as_u32bit(0, 12) == 12)
- return new EVP_BlockCipher(EVP_rc5_32_12_16_ecb(), "RC5(12)", 1, 32, 1);
+ return new EVP_BlockCipher(EVP_rc5_32_12_16_ecb(),
+ "RC5(12)", 1, 32, 1);
#endif
#if !defined(OPENSSL_NO_IDEA)