diff options
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/md2/md2.h | 2 | ||||
-rw-r--r-- | src/lib/hash/par_hash/par_hash.h | 2 | ||||
-rw-r--r-- | src/lib/hash/sha1/sha160.h | 2 |
6 files changed, 6 insertions, 6 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/md2/md2.h b/src/lib/hash/md2/md2.h index ab29a49cb..58629495a 100644 --- a/src/lib/hash/md2/md2.h +++ b/src/lib/hash/md2/md2.h @@ -25,7 +25,7 @@ class BOTAN_DLL MD2 final : public HashFunction void clear() override; - MD2() : m_X(48), m_checksum(16), m_buffer(16) + MD2() : m_X(48), m_checksum(16), m_buffer(16), m_position(0) { clear(); } private: void add_data(const byte[], size_t) override; 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(); |