aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine/openssl/ossl_bc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/openssl/ossl_bc.cpp')
-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)