diff options
author | Daniel Neus <[email protected]> | 2016-01-11 21:52:38 +0100 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-03-05 12:10:39 +0100 |
commit | fbdc39de29a0efbcd13ad169c844189168d2110d (patch) | |
tree | ffadbfd29b164ce81a6628773a1f5f8216ab8fb6 /src/lib/hash | |
parent | 4424af469bd2bfe05b9ac1cd4e156383f23ae9e4 (diff) |
cppcheck fixes: Class 'X' has a constructor with 1 argument that is not explicit.
Diffstat (limited to 'src/lib/hash')
-rw-r--r-- | src/lib/hash/blake2/blake2b.h | 2 | ||||
-rw-r--r-- | src/lib/hash/hash.cpp | 2 | ||||
-rw-r--r-- | src/lib/hash/keccak/keccak.h | 2 | ||||
-rw-r--r-- | src/lib/hash/par_hash/par_hash.h | 2 | ||||
-rw-r--r-- | src/lib/hash/sha1/sha160.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/hash/blake2/blake2b.h b/src/lib/hash/blake2/blake2b.h index efe0d34f4..290db10f0 100644 --- a/src/lib/hash/blake2/blake2b.h +++ b/src/lib/hash/blake2/blake2b.h @@ -29,7 +29,7 @@ class BOTAN_DLL Blake2b final : public HashFunction /** * @param output_bits the output size of Blake2b in bits */ - Blake2b(size_t output_bits = 512); + explicit Blake2b(size_t output_bits = 512); size_t hash_block_size() const override { return BLAKE2B_BLOCKBYTES; } size_t output_length() const override { return m_output_bits / 8; } diff --git a/src/lib/hash/hash.cpp b/src/lib/hash/hash.cpp index b6a7ca50d..9a15c7998 100644 --- a/src/lib/hash/hash.cpp +++ b/src/lib/hash/hash.cpp @@ -98,7 +98,7 @@ namespace Botan { std::unique_ptr<HashFunction> HashFunction::create(const std::string& algo_spec, const std::string& provider) { - return std::unique_ptr<HashFunction>(make_a<HashFunction>(algo_spec, provider)); + return std::unique_ptr<HashFunction>(make_a<HashFunction>(Botan::HashFunction::Spec(algo_spec), provider)); } std::vector<std::string> HashFunction::providers(const std::string& algo_spec) diff --git a/src/lib/hash/keccak/keccak.h b/src/lib/hash/keccak/keccak.h index 7929dd502..a73595d6a 100644 --- a/src/lib/hash/keccak/keccak.h +++ b/src/lib/hash/keccak/keccak.h @@ -25,7 +25,7 @@ class BOTAN_DLL Keccak_1600 final : public HashFunction * @param output_bits the size of the hash output; must be one of * 224, 256, 384, or 512 */ - Keccak_1600(size_t output_bits = 512); + explicit Keccak_1600(size_t output_bits = 512); size_t hash_block_size() const override { return m_bitrate / 8; } size_t output_length() const override { return m_output_bits / 8; } diff --git a/src/lib/hash/par_hash/par_hash.h b/src/lib/hash/par_hash/par_hash.h index b0e2ff828..3a93f4e8e 100644 --- a/src/lib/hash/par_hash/par_hash.h +++ b/src/lib/hash/par_hash/par_hash.h @@ -28,7 +28,7 @@ class BOTAN_DLL Parallel final : public HashFunction /** * @param hashes a set of hashes to compute in parallel */ - Parallel(const std::vector<HashFunction*>& hashes); + explicit Parallel(const std::vector<HashFunction*>& hashes); Parallel(const Parallel&) = delete; Parallel& operator=(const Parallel&) = delete; diff --git a/src/lib/hash/sha1/sha160.h b/src/lib/hash/sha1/sha160.h index 2f5d9b16e..b4a161c14 100644 --- a/src/lib/hash/sha1/sha160.h +++ b/src/lib/hash/sha1/sha160.h @@ -35,7 +35,7 @@ class BOTAN_DLL SHA_160 : public MDx_HashFunction * constraints * @param W_size how big to make W */ - SHA_160(size_t W_size) : + explicit SHA_160(size_t W_size) : MDx_HashFunction(64, true, true), m_digest(5), m_W(W_size) { clear(); |