aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/stream
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/stream
parent4424af469bd2bfe05b9ac1cd4e156383f23ae9e4 (diff)
cppcheck fixes: Class 'X' has a constructor with 1 argument that is not explicit.
Diffstat (limited to 'src/lib/stream')
-rw-r--r--src/lib/stream/ctr/ctr.h2
-rw-r--r--src/lib/stream/ofb/ofb.h2
-rw-r--r--src/lib/stream/rc4/rc4.h2
-rw-r--r--src/lib/stream/stream_cipher.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/stream/ctr/ctr.h b/src/lib/stream/ctr/ctr.h
index dc05fa596..8e931605c 100644
--- a/src/lib/stream/ctr/ctr.h
+++ b/src/lib/stream/ctr/ctr.h
@@ -43,7 +43,7 @@ class BOTAN_DLL CTR_BE final : public StreamCipher
/**
* @param cipher the underlying block cipher to use
*/
- CTR_BE(BlockCipher* cipher);
+ explicit CTR_BE(BlockCipher* cipher);
private:
void key_schedule(const byte key[], size_t key_len) override;
void increment_counter();
diff --git a/src/lib/stream/ofb/ofb.h b/src/lib/stream/ofb/ofb.h
index 4775c5575..fecd47d9d 100644
--- a/src/lib/stream/ofb/ofb.h
+++ b/src/lib/stream/ofb/ofb.h
@@ -43,7 +43,7 @@ class BOTAN_DLL OFB final : public StreamCipher
/**
* @param cipher the underlying block cipher to use
*/
- OFB(BlockCipher* cipher);
+ explicit OFB(BlockCipher* cipher);
private:
void key_schedule(const byte key[], size_t key_len) override;
diff --git a/src/lib/stream/rc4/rc4.h b/src/lib/stream/rc4/rc4.h
index db1726a18..f166a2772 100644
--- a/src/lib/stream/rc4/rc4.h
+++ b/src/lib/stream/rc4/rc4.h
@@ -36,7 +36,7 @@ class BOTAN_DLL RC4 final : public StreamCipher
/**
* @param skip skip this many initial bytes in the keystream
*/
- RC4(size_t skip = 0);
+ explicit RC4(size_t skip = 0);
~RC4() { clear(); }
private:
diff --git a/src/lib/stream/stream_cipher.cpp b/src/lib/stream/stream_cipher.cpp
index 060e65d86..03ef5e329 100644
--- a/src/lib/stream/stream_cipher.cpp
+++ b/src/lib/stream/stream_cipher.cpp
@@ -33,7 +33,7 @@ namespace Botan {
std::unique_ptr<StreamCipher> StreamCipher::create(const std::string& algo_spec,
const std::string& provider)
{
- return std::unique_ptr<StreamCipher>(make_a<StreamCipher>(algo_spec, provider));
+ return std::unique_ptr<StreamCipher>(make_a<StreamCipher>(Botan::StreamCipher::Spec(algo_spec), provider));
}
std::vector<std::string> StreamCipher::providers(const std::string& algo_spec)