aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
diff options
context:
space:
mode:
authorDaniel Neus <[email protected]>2016-01-11 21:52:38 +0100
committerDaniel Neus <[email protected]>2016-03-05 12:10:39 +0100
commitfbdc39de29a0efbcd13ad169c844189168d2110d (patch)
treeffadbfd29b164ce81a6628773a1f5f8216ab8fb6 /src/lib/block
parent4424af469bd2bfe05b9ac1cd4e156383f23ae9e4 (diff)
cppcheck fixes: Class 'X' has a constructor with 1 argument that is not explicit.
Diffstat (limited to 'src/lib/block')
-rw-r--r--src/lib/block/block_cipher.cpp2
-rw-r--r--src/lib/block/cast/cast128.cpp2
-rw-r--r--src/lib/block/gost_28147/gost_28147.h4
-rw-r--r--src/lib/block/rc5/rc5.h2
-rw-r--r--src/lib/block/safer/safer_sk.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/block/block_cipher.cpp b/src/lib/block/block_cipher.cpp
index 7b52f8716..c70ba229d 100644
--- a/src/lib/block/block_cipher.cpp
+++ b/src/lib/block/block_cipher.cpp
@@ -150,7 +150,7 @@ BlockCipher::~BlockCipher() {}
std::unique_ptr<BlockCipher> BlockCipher::create(const std::string& algo_spec,
const std::string& provider)
{
- return std::unique_ptr<BlockCipher>(make_a<BlockCipher>(algo_spec, provider));
+ return std::unique_ptr<BlockCipher>(make_a<BlockCipher>(Botan::BlockCipher::Spec(algo_spec), provider));
}
std::vector<std::string> BlockCipher::providers(const std::string& algo_spec)
diff --git a/src/lib/block/cast/cast128.cpp b/src/lib/block/cast/cast128.cpp
index ce9e86794..53f7d4611 100644
--- a/src/lib/block/cast/cast128.cpp
+++ b/src/lib/block/cast/cast128.cpp
@@ -330,7 +330,7 @@ void CAST_128::cast_ks(secure_vector<u32bit>& K,
{
public:
byte operator()(size_t i) { return (m_X[i/4] >> (8*(3 - (i%4)))); }
- ByteReader(const u32bit* x) : m_X(x) {}
+ explicit ByteReader(const u32bit* x) : m_X(x) {}
private:
const u32bit* m_X;
};
diff --git a/src/lib/block/gost_28147/gost_28147.h b/src/lib/block/gost_28147/gost_28147.h
index 11f5228a6..4105154e3 100644
--- a/src/lib/block/gost_28147/gost_28147.h
+++ b/src/lib/block/gost_28147/gost_28147.h
@@ -63,9 +63,9 @@ class BOTAN_DLL GOST_28147_89 final : public Block_Cipher_Fixed_Params<8, 32>
/**
* @param params the sbox parameters to use
*/
- GOST_28147_89(const GOST_28147_89_Params& params);
+ explicit GOST_28147_89(const GOST_28147_89_Params& params);
private:
- GOST_28147_89(const std::vector<u32bit>& other_SBOX) :
+ explicit GOST_28147_89(const std::vector<u32bit>& other_SBOX) :
m_SBOX(other_SBOX), m_EK(8) {}
void key_schedule(const byte[], size_t) override;
diff --git a/src/lib/block/rc5/rc5.h b/src/lib/block/rc5/rc5.h
index 17469205f..4d9232326 100644
--- a/src/lib/block/rc5/rc5.h
+++ b/src/lib/block/rc5/rc5.h
@@ -29,7 +29,7 @@ class BOTAN_DLL RC5 final : public Block_Cipher_Fixed_Params<8, 1, 32>
* @param rounds the number of RC5 rounds to run. Must be between
* 8 and 32 and a multiple of 4.
*/
- RC5(size_t rounds);
+ explicit RC5(size_t rounds);
private:
void key_schedule(const byte[], size_t) override;
diff --git a/src/lib/block/safer/safer_sk.h b/src/lib/block/safer/safer_sk.h
index babc22eb9..af944b36c 100644
--- a/src/lib/block/safer/safer_sk.h
+++ b/src/lib/block/safer/safer_sk.h
@@ -29,7 +29,7 @@ class BOTAN_DLL SAFER_SK final : public Block_Cipher_Fixed_Params<8, 16>
* @param rounds the number of rounds to use - must be between 1
* and 13
*/
- SAFER_SK(size_t rounds);
+ explicit SAFER_SK(size_t rounds);
private:
void key_schedule(const byte[], size_t) override;