aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/asm_engine/asm_engine.cpp4
-rw-r--r--src/engine/asm_engine/asm_engine.h2
-rw-r--r--src/engine/core_engine/core_engine.h4
-rw-r--r--src/engine/core_engine/core_modes.cpp14
-rw-r--r--src/engine/core_engine/def_pk_ops.cpp10
-rw-r--r--src/engine/core_engine/lookup_block.cpp12
-rw-r--r--src/engine/core_engine/lookup_hash.cpp4
-rw-r--r--src/engine/core_engine/lookup_mac.cpp2
-rw-r--r--src/engine/core_engine/lookup_pbkdf.cpp2
-rw-r--r--src/engine/core_engine/lookup_stream.cpp2
-rw-r--r--src/engine/dyn_engine/dyn_engine.cpp6
-rw-r--r--src/engine/engine.cpp24
-rw-r--r--src/engine/gnump/gmp_wrap.h2
-rw-r--r--src/engine/gnump/gnump_pk.cpp16
-rw-r--r--src/engine/openssl/bn_wrap.cpp4
-rw-r--r--src/engine/openssl/bn_wrap.h2
-rw-r--r--src/engine/openssl/ossl_arc4.cpp4
-rw-r--r--src/engine/openssl/ossl_bc.cpp2
-rw-r--r--src/engine/openssl/ossl_pk.cpp16
-rw-r--r--src/engine/simd_engine/simd_engine.cpp4
-rw-r--r--src/engine/simd_engine/simd_engine.h2
21 files changed, 71 insertions, 67 deletions
diff --git a/src/engine/asm_engine/asm_engine.cpp b/src/engine/asm_engine/asm_engine.cpp
index 6d475136f..a43a3302d 100644
--- a/src/engine/asm_engine/asm_engine.cpp
+++ b/src/engine/asm_engine/asm_engine.cpp
@@ -40,7 +40,7 @@ Assembler_Engine::find_block_cipher(const SCAN_Name& request,
#endif
}
- return 0;
+ return nullptr;
}
HashFunction*
@@ -66,7 +66,7 @@ Assembler_Engine::find_hash(const SCAN_Name& request,
#endif
}
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/asm_engine/asm_engine.h b/src/engine/asm_engine/asm_engine.h
index bd82566d3..40fe5342f 100644
--- a/src/engine/asm_engine/asm_engine.h
+++ b/src/engine/asm_engine/asm_engine.h
@@ -23,7 +23,7 @@ class Assembler_Engine : public Engine
BlockCipher* find_block_cipher(const SCAN_Name&,
Algorithm_Factory&) const;
- HashFunction* find_hash(const SCAN_Name& reqeust,
+ HashFunction* find_hash(const SCAN_Name& request,
Algorithm_Factory&) const;
};
diff --git a/src/engine/core_engine/core_engine.h b/src/engine/core_engine/core_engine.h
index 5386991c3..983b75290 100644
--- a/src/engine/core_engine/core_engine.h
+++ b/src/engine/core_engine/core_engine.h
@@ -44,10 +44,10 @@ class Core_Engine : public Engine
StreamCipher* find_stream_cipher(const SCAN_Name&,
Algorithm_Factory&) const;
- HashFunction* find_hash(const SCAN_Name& reqeust,
+ HashFunction* find_hash(const SCAN_Name& request,
Algorithm_Factory&) const;
- MessageAuthenticationCode* find_mac(const SCAN_Name& reqeust,
+ MessageAuthenticationCode* find_mac(const SCAN_Name& request,
Algorithm_Factory&) const;
PBKDF* find_pbkdf(const SCAN_Name& algo_spec,
diff --git a/src/engine/core_engine/core_modes.cpp b/src/engine/core_engine/core_modes.cpp
index 8a929e880..ffd8aa04f 100644
--- a/src/engine/core_engine/core_modes.cpp
+++ b/src/engine/core_engine/core_modes.cpp
@@ -111,7 +111,7 @@ Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
else
return new CTS_Decryption(block_cipher->clone());
#else
- return 0;
+ return nullptr;
#endif
}
@@ -123,7 +123,7 @@ Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
return new CBC_Decryption(block_cipher->clone(),
get_bc_pad(padding, "PKCS7"));
#else
- return 0;
+ return nullptr;
#endif
}
@@ -149,7 +149,7 @@ Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
else if(algo_info.size() == 2)
bits = to_u32bit(algo_info[1]);
else
- return 0;
+ return nullptr;
#if defined(BOTAN_HAS_CFB)
if(mode_name == "CFB")
@@ -172,7 +172,7 @@ Keyed_Filter* get_cipher_mode(const BlockCipher* block_cipher,
#endif
}
- return 0;
+ return nullptr;
}
/*
@@ -195,10 +195,10 @@ Keyed_Filter* Core_Engine::get_cipher(const std::string& algo_spec,
const BlockCipher* block_cipher = af.prototype_block_cipher(cipher_name);
if(!block_cipher)
- return 0;
+ return nullptr;
if(algo_parts.size() >= 4)
- return 0; // 4 part mode, not something we know about
+ return nullptr; // 4 part mode, not something we know about
if(algo_parts.size() < 2)
throw Lookup_Error("Cipher specification '" + algo_spec +
@@ -213,7 +213,7 @@ Keyed_Filter* Core_Engine::get_cipher(const std::string& algo_spec,
padding = (mode == "CBC") ? "PKCS7" : "NoPadding";
if(mode == "ECB" && padding == "CTS")
- return 0;
+ return nullptr;
else if((mode != "CBC" && mode != "ECB") && padding != "NoPadding")
throw Invalid_Algorithm_Name(algo_spec);
diff --git a/src/engine/core_engine/def_pk_ops.cpp b/src/engine/core_engine/def_pk_ops.cpp
index db418d5bc..23ba7722c 100644
--- a/src/engine/core_engine/def_pk_ops.cpp
+++ b/src/engine/core_engine/def_pk_ops.cpp
@@ -58,7 +58,7 @@ Core_Engine::get_encryption_op(const Public_Key& key) const
return new ElGamal_Encryption_Operation(*s);
#endif
- return 0;
+ return nullptr;
}
PK_Ops::Decryption*
@@ -74,7 +74,7 @@ Core_Engine::get_decryption_op(const Private_Key& key) const
return new ElGamal_Decryption_Operation(*s);
#endif
- return 0;
+ return nullptr;
}
PK_Ops::Key_Agreement*
@@ -90,7 +90,7 @@ Core_Engine::get_key_agreement_op(const Private_Key& key) const
return new ECDH_KA_Operation(*ecdh);
#endif
- return 0;
+ return nullptr;
}
PK_Ops::Signature*
@@ -127,7 +127,7 @@ Core_Engine::get_signature_op(const Private_Key& key) const
return new NR_Signature_Operation(*s);
#endif
- return 0;
+ return nullptr;
}
PK_Ops::Verification*
@@ -164,7 +164,7 @@ Core_Engine::get_verify_op(const Public_Key& key) const
return new NR_Verification_Operation(*s);
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/core_engine/lookup_block.cpp b/src/engine/core_engine/lookup_block.cpp
index c27a13237..a02c75daa 100644
--- a/src/engine/core_engine/lookup_block.cpp
+++ b/src/engine/core_engine/lookup_block.cpp
@@ -135,8 +135,12 @@ BlockCipher* Core_Engine::find_block_cipher(const SCAN_Name& request,
#endif
#if defined(BOTAN_HAS_CAMELLIA)
- if(request.algo_name() == "Camellia")
- return new Camellia;
+ if(request.algo_name() == "Camellia-128")
+ return new Camellia_128;
+ if(request.algo_name() == "Camellia-192")
+ return new Camellia_192;
+ if(request.algo_name() == "Camellia-256")
+ return new Camellia_256;
#endif
#if defined(BOTAN_HAS_CAST)
@@ -273,13 +277,13 @@ BlockCipher* Core_Engine::find_block_cipher(const SCAN_Name& request,
af.prototype_stream_cipher(request.arg(1));
if(!hash || !stream_cipher)
- return 0;
+ return nullptr;
return new Lion(hash->clone(), stream_cipher->clone(), block_size);
}
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/core_engine/lookup_hash.cpp b/src/engine/core_engine/lookup_hash.cpp
index f94a97864..9958d18b9 100644
--- a/src/engine/core_engine/lookup_hash.cpp
+++ b/src/engine/core_engine/lookup_hash.cpp
@@ -218,7 +218,7 @@ HashFunction* Core_Engine::find_hash(const SCAN_Name& request,
{
const HashFunction* hash = af.prototype_hash_function(request.arg(i));
if(!hash)
- return 0;
+ return nullptr;
hash_prototypes.push_back(hash);
}
@@ -232,7 +232,7 @@ HashFunction* Core_Engine::find_hash(const SCAN_Name& request,
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/core_engine/lookup_mac.cpp b/src/engine/core_engine/lookup_mac.cpp
index 9f322b399..32275b559 100644
--- a/src/engine/core_engine/lookup_mac.cpp
+++ b/src/engine/core_engine/lookup_mac.cpp
@@ -64,7 +64,7 @@ Core_Engine::find_mac(const SCAN_Name& request,
return new ANSI_X919_MAC(af.make_block_cipher("DES"));
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/core_engine/lookup_pbkdf.cpp b/src/engine/core_engine/lookup_pbkdf.cpp
index 9e9255f0a..2419f4373 100644
--- a/src/engine/core_engine/lookup_pbkdf.cpp
+++ b/src/engine/core_engine/lookup_pbkdf.cpp
@@ -46,7 +46,7 @@ PBKDF* Core_Engine::find_pbkdf(const SCAN_Name& algo_spec,
return new OpenPGP_S2K(af.make_hash_function(algo_spec.arg(0)));
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/core_engine/lookup_stream.cpp b/src/engine/core_engine/lookup_stream.cpp
index 5b4859c1a..50e246756 100644
--- a/src/engine/core_engine/lookup_stream.cpp
+++ b/src/engine/core_engine/lookup_stream.cpp
@@ -55,7 +55,7 @@ Core_Engine::find_stream_cipher(const SCAN_Name& request,
return new WiderWake_41_BE;
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/dyn_engine/dyn_engine.cpp b/src/engine/dyn_engine/dyn_engine.cpp
index b76544d0f..078ec4b83 100644
--- a/src/engine/dyn_engine/dyn_engine.cpp
+++ b/src/engine/dyn_engine/dyn_engine.cpp
@@ -21,7 +21,7 @@ extern "C" {
Dynamically_Loaded_Engine::Dynamically_Loaded_Engine(
const std::string& library_path) :
- engine(0)
+ engine(nullptr)
{
lib = new Dynamically_Loaded_Library(library_path);
@@ -35,7 +35,7 @@ Dynamically_Loaded_Engine::Dynamically_Loaded_Engine(
if(mod_version != 20101003)
throw std::runtime_error("Incompatible version in " +
library_path + " of " +
- to_string(mod_version));
+ std::to_string(mod_version));
creator_func creator =
lib->resolve<creator_func>("create_engine");
@@ -49,7 +49,7 @@ Dynamically_Loaded_Engine::Dynamically_Loaded_Engine(
catch(...)
{
delete lib;
- lib = 0;
+ lib = nullptr;
throw;
}
}
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index 80712a2f8..d4f6885bc 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -13,79 +13,79 @@ BlockCipher*
Engine::find_block_cipher(const SCAN_Name&,
Algorithm_Factory&) const
{
- return 0;
+ return nullptr;
}
StreamCipher*
Engine::find_stream_cipher(const SCAN_Name&,
Algorithm_Factory&) const
{
- return 0;
+ return nullptr;
}
HashFunction*
Engine::find_hash(const SCAN_Name&,
Algorithm_Factory&) const
{
- return 0;
+ return nullptr;
}
MessageAuthenticationCode*
Engine::find_mac(const SCAN_Name&,
Algorithm_Factory&) const
{
- return 0;
+ return nullptr;
}
PBKDF*
Engine::find_pbkdf(const SCAN_Name&,
Algorithm_Factory&) const
{
- return 0;
+ return nullptr;
}
Modular_Exponentiator*
Engine::mod_exp(const BigInt&,
Power_Mod::Usage_Hints) const
{
- return 0;
+ return nullptr;
}
Keyed_Filter* Engine::get_cipher(const std::string&,
Cipher_Dir,
Algorithm_Factory&)
{
- return 0;
+ return nullptr;
}
PK_Ops::Key_Agreement*
Engine::get_key_agreement_op(const Private_Key&) const
{
- return 0;
+ return nullptr;
}
PK_Ops::Signature*
Engine::get_signature_op(const Private_Key&) const
{
- return 0;
+ return nullptr;
}
PK_Ops::Verification*
Engine::get_verify_op(const Public_Key&) const
{
- return 0;
+ return nullptr;
}
PK_Ops::Encryption*
Engine::get_encryption_op(const Public_Key&) const
{
- return 0;
+ return nullptr;
}
PK_Ops::Decryption*
Engine::get_decryption_op(const Private_Key&) const
{
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/gnump/gmp_wrap.h b/src/engine/gnump/gmp_wrap.h
index fc7aa856e..0a786f3ee 100644
--- a/src/engine/gnump/gmp_wrap.h
+++ b/src/engine/gnump/gmp_wrap.h
@@ -25,7 +25,7 @@ class GMP_MPZ
void encode(byte[], size_t) const;
size_t bytes() const;
- SecureVector<byte> to_bytes() const
+ secure_vector<byte> to_bytes() const
{ return BigInt::encode(to_bigint()); }
GMP_MPZ& operator=(const GMP_MPZ&);
diff --git a/src/engine/gnump/gnump_pk.cpp b/src/engine/gnump/gnump_pk.cpp
index 25735fe55..b2a2f9352 100644
--- a/src/engine/gnump/gnump_pk.cpp
+++ b/src/engine/gnump/gnump_pk.cpp
@@ -38,7 +38,7 @@ class GMP_DH_KA_Operation : public PK_Ops::Key_Agreement
GMP_DH_KA_Operation(const DH_PrivateKey& dh) :
x(dh.get_x()), p(dh.group_p()) {}
- SecureVector<byte> agree(const byte w[], size_t w_len)
+ secure_vector<byte> agree(const byte w[], size_t w_len)
{
GMP_MPZ z(w, w_len);
mpz_powm(z.value, z.value, x.value, p.value);
@@ -66,14 +66,14 @@ class GMP_DSA_Signature_Operation : public PK_Ops::Signature
size_t message_part_size() const { return (q_bits + 7) / 8; }
size_t max_input_bits() const { return q_bits; }
- SecureVector<byte> sign(const byte msg[], size_t msg_len,
+ secure_vector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng);
private:
const GMP_MPZ x, p, q, g;
size_t q_bits;
};
-SecureVector<byte>
+secure_vector<byte>
GMP_DSA_Signature_Operation::sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng)
{
@@ -104,7 +104,7 @@ GMP_DSA_Signature_Operation::sign(const byte msg[], size_t msg_len,
if(mpz_cmp_ui(r.value, 0) == 0 || mpz_cmp_ui(s.value, 0) == 0)
throw Internal_Error("GMP_DSA_Op::sign: r or s was zero");
- SecureVector<byte> output(2*q_bytes);
+ secure_vector<byte> output(2*q_bytes);
r.encode(output, q_bytes);
s.encode(output + q_bytes, q_bytes);
return output;
@@ -192,7 +192,7 @@ class GMP_RSA_Private_Operation : public PK_Ops::Signature,
size_t max_input_bits() const { return (n_bits - 1); }
- SecureVector<byte> sign(const byte msg[], size_t msg_len,
+ secure_vector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator&)
{
BigInt m(msg, msg_len);
@@ -200,7 +200,7 @@ class GMP_RSA_Private_Operation : public PK_Ops::Signature,
return BigInt::encode_1363(x, (n_bits + 7) / 8);
}
- SecureVector<byte> decrypt(const byte msg[], size_t msg_len)
+ secure_vector<byte> decrypt(const byte msg[], size_t msg_len)
{
BigInt m(msg, msg_len);
return BigInt::encode(private_op(m));
@@ -238,14 +238,14 @@ class GMP_RSA_Public_Operation : public PK_Ops::Verification,
size_t max_input_bits() const { return (n.bits() - 1); }
bool with_recovery() const { return true; }
- SecureVector<byte> encrypt(const byte msg[], size_t msg_len,
+ secure_vector<byte> encrypt(const byte msg[], size_t msg_len,
RandomNumberGenerator&)
{
BigInt m(msg, msg_len);
return BigInt::encode_1363(public_op(m), n.bytes());
}
- SecureVector<byte> verify_mr(const byte msg[], size_t msg_len)
+ secure_vector<byte> verify_mr(const byte msg[], size_t msg_len)
{
BigInt m(msg, msg_len);
return BigInt::encode(public_op(m));
diff --git a/src/engine/openssl/bn_wrap.cpp b/src/engine/openssl/bn_wrap.cpp
index 779956824..0ac31f61b 100644
--- a/src/engine/openssl/bn_wrap.cpp
+++ b/src/engine/openssl/bn_wrap.cpp
@@ -15,7 +15,7 @@ namespace Botan {
OSSL_BN::OSSL_BN(const BigInt& in)
{
value = BN_new();
- SecureVector<byte> encoding = BigInt::encode(in);
+ secure_vector<byte> encoding = BigInt::encode(in);
if(in != 0)
BN_bin2bn(encoding, encoding.size(), value);
}
@@ -75,7 +75,7 @@ size_t OSSL_BN::bytes() const
*/
BigInt OSSL_BN::to_bigint() const
{
- SecureVector<byte> out(bytes());
+ secure_vector<byte> out(bytes());
BN_bn2bin(value, out);
return BigInt::decode(out);
}
diff --git a/src/engine/openssl/bn_wrap.h b/src/engine/openssl/bn_wrap.h
index c5c07a35c..177dbd8c7 100644
--- a/src/engine/openssl/bn_wrap.h
+++ b/src/engine/openssl/bn_wrap.h
@@ -25,7 +25,7 @@ class OSSL_BN
void encode(byte[], size_t) const;
size_t bytes() const;
- SecureVector<byte> to_bytes() const
+ secure_vector<byte> to_bytes() const
{ return BigInt::encode(to_bigint()); }
OSSL_BN& operator=(const OSSL_BN&);
diff --git a/src/engine/openssl/ossl_arc4.cpp b/src/engine/openssl/ossl_arc4.cpp
index 0b1f7f1f3..6469d263a 100644
--- a/src/engine/openssl/ossl_arc4.cpp
+++ b/src/engine/openssl/ossl_arc4.cpp
@@ -46,7 +46,7 @@ std::string ARC4_OpenSSL::name() const
{
if(SKIP == 0) return "ARC4";
if(SKIP == 256) return "MARK-4";
- else return "RC4_skip(" + to_string(SKIP) + ")";
+ else return "RC4_skip(" + std::to_string(SKIP) + ")";
}
/*
@@ -71,7 +71,7 @@ void ARC4_OpenSSL::cipher(const byte in[], byte out[], size_t length)
}
/**
-* Look for an OpenSSL-suported stream cipher (ARC4)
+* Look for an OpenSSL-supported stream cipher (ARC4)
*/
StreamCipher*
OpenSSL_Engine::find_stream_cipher(const SCAN_Name& request,
diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp
index 36f78205f..d419f56be 100644
--- a/src/engine/openssl/ossl_bc.cpp
+++ b/src/engine/openssl/ossl_bc.cpp
@@ -123,7 +123,7 @@ void EVP_BlockCipher::decrypt_n(const byte in[], byte out[],
*/
void EVP_BlockCipher::key_schedule(const byte key[], size_t length)
{
- SecureVector<byte> full_key(key, length);
+ secure_vector<byte> full_key(key, length);
if(cipher_name == "TripleDES" && length == 16)
{
diff --git a/src/engine/openssl/ossl_pk.cpp b/src/engine/openssl/ossl_pk.cpp
index 23ae6b25d..2557ec297 100644
--- a/src/engine/openssl/ossl_pk.cpp
+++ b/src/engine/openssl/ossl_pk.cpp
@@ -36,7 +36,7 @@ class OSSL_DH_KA_Operation : public PK_Ops::Key_Agreement
OSSL_DH_KA_Operation(const DH_PrivateKey& dh) :
x(dh.get_x()), p(dh.group_p()) {}
- SecureVector<byte> agree(const byte w[], size_t w_len)
+ secure_vector<byte> agree(const byte w[], size_t w_len)
{
OSSL_BN i(w, w_len), r;
BN_mod_exp(r.value, i.value, x.value, p.value, ctx.value);
@@ -65,7 +65,7 @@ class OSSL_DSA_Signature_Operation : public PK_Ops::Signature
size_t message_part_size() const { return (q_bits + 7) / 8; }
size_t max_input_bits() const { return q_bits; }
- SecureVector<byte> sign(const byte msg[], size_t msg_len,
+ secure_vector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng);
private:
const OSSL_BN x, p, q, g;
@@ -73,7 +73,7 @@ class OSSL_DSA_Signature_Operation : public PK_Ops::Signature
size_t q_bits;
};
-SecureVector<byte>
+secure_vector<byte>
OSSL_DSA_Signature_Operation::sign(const byte msg[], size_t msg_len,
RandomNumberGenerator& rng)
{
@@ -103,7 +103,7 @@ OSSL_DSA_Signature_Operation::sign(const byte msg[], size_t msg_len,
if(BN_is_zero(r.value) || BN_is_zero(s.value))
throw Internal_Error("OpenSSL_DSA_Op::sign: r or s was zero");
- SecureVector<byte> output(2*q_bytes);
+ secure_vector<byte> output(2*q_bytes);
r.encode(output, q_bytes);
s.encode(output + q_bytes, q_bytes);
return output;
@@ -191,7 +191,7 @@ class OSSL_RSA_Private_Operation : public PK_Ops::Signature,
size_t max_input_bits() const { return (n_bits - 1); }
- SecureVector<byte> sign(const byte msg[], size_t msg_len,
+ secure_vector<byte> sign(const byte msg[], size_t msg_len,
RandomNumberGenerator&)
{
BigInt m(msg, msg_len);
@@ -199,7 +199,7 @@ class OSSL_RSA_Private_Operation : public PK_Ops::Signature,
return BigInt::encode_1363(x, (n_bits + 7) / 8);
}
- SecureVector<byte> decrypt(const byte msg[], size_t msg_len)
+ secure_vector<byte> decrypt(const byte msg[], size_t msg_len)
{
BigInt m(msg, msg_len);
return BigInt::encode(private_op(m));
@@ -237,14 +237,14 @@ class OSSL_RSA_Public_Operation : public PK_Ops::Verification,
size_t max_input_bits() const { return (n.bits() - 1); }
bool with_recovery() const { return true; }
- SecureVector<byte> encrypt(const byte msg[], size_t msg_len,
+ secure_vector<byte> encrypt(const byte msg[], size_t msg_len,
RandomNumberGenerator&)
{
BigInt m(msg, msg_len);
return BigInt::encode_1363(public_op(m), n.bytes());
}
- SecureVector<byte> verify_mr(const byte msg[], size_t msg_len)
+ secure_vector<byte> verify_mr(const byte msg[], size_t msg_len)
{
BigInt m(msg, msg_len);
return BigInt::encode(public_op(m));
diff --git a/src/engine/simd_engine/simd_engine.cpp b/src/engine/simd_engine/simd_engine.cpp
index f9a731a82..70529f1fd 100644
--- a/src/engine/simd_engine/simd_engine.cpp
+++ b/src/engine/simd_engine/simd_engine.cpp
@@ -68,7 +68,7 @@ SIMD_Engine::find_block_cipher(const SCAN_Name& request,
return new XTEA_SIMD;
#endif
- return 0;
+ return nullptr;
}
HashFunction*
@@ -80,7 +80,7 @@ SIMD_Engine::find_hash(const SCAN_Name& request,
return new SHA_160_SSE2;
#endif
- return 0;
+ return nullptr;
}
}
diff --git a/src/engine/simd_engine/simd_engine.h b/src/engine/simd_engine/simd_engine.h
index 73f7d2233..66c8886f1 100644
--- a/src/engine/simd_engine/simd_engine.h
+++ b/src/engine/simd_engine/simd_engine.h
@@ -23,7 +23,7 @@ class SIMD_Engine : public Engine
BlockCipher* find_block_cipher(const SCAN_Name&,
Algorithm_Factory&) const;
- HashFunction* find_hash(const SCAN_Name& reqeust,
+ HashFunction* find_hash(const SCAN_Name& request,
Algorithm_Factory&) const;
};