aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-03-05 13:10:30 -0500
committerJack Lloyd <[email protected]>2016-03-05 13:10:30 -0500
commita3ce0bd1e9e018ea69741c4380bf065cccedec93 (patch)
tree71eac335b7bdc3a845b1d6599b78e337ad00433c /src/lib/mac
parent2467ccccd48fc502ee3e04d847d514e88d88b144 (diff)
parentc3540ae668a523c0155677c4ee4c9099910110bc (diff)
Make almost all single argument constructors `explicit`
GH #444
Diffstat (limited to 'src/lib/mac')
-rw-r--r--src/lib/mac/cbc_mac/cbc_mac.h2
-rw-r--r--src/lib/mac/cmac/cmac.h2
-rw-r--r--src/lib/mac/hmac/hmac.h2
-rw-r--r--src/lib/mac/mac.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/mac/cbc_mac/cbc_mac.h b/src/lib/mac/cbc_mac/cbc_mac.h
index 06d1dc852..cd2ebd18f 100644
--- a/src/lib/mac/cbc_mac/cbc_mac.h
+++ b/src/lib/mac/cbc_mac/cbc_mac.h
@@ -32,7 +32,7 @@ class BOTAN_DLL CBC_MAC final : public MessageAuthenticationCode
/**
* @param cipher the underlying block cipher to use
*/
- CBC_MAC(BlockCipher* cipher);
+ explicit CBC_MAC(BlockCipher* cipher);
static CBC_MAC* make(const Spec& spec);
private:
diff --git a/src/lib/mac/cmac/cmac.h b/src/lib/mac/cmac/cmac.h
index 5a38de28d..0e973b79d 100644
--- a/src/lib/mac/cmac/cmac.h
+++ b/src/lib/mac/cmac/cmac.h
@@ -40,7 +40,7 @@ class BOTAN_DLL CMAC final : public MessageAuthenticationCode
/**
* @param cipher the underlying block cipher to use
*/
- CMAC(BlockCipher* cipher);
+ explicit CMAC(BlockCipher* cipher);
static CMAC* make(const Spec& spec);
diff --git a/src/lib/mac/hmac/hmac.h b/src/lib/mac/hmac/hmac.h
index 5154739d2..654a167e7 100644
--- a/src/lib/mac/hmac/hmac.h
+++ b/src/lib/mac/hmac/hmac.h
@@ -34,7 +34,7 @@ class BOTAN_DLL HMAC final : public MessageAuthenticationCode
/**
* @param hash the hash to use for HMACing
*/
- HMAC(HashFunction* hash);
+ explicit HMAC(HashFunction* hash);
static HMAC* make(const Spec& spec);
diff --git a/src/lib/mac/mac.cpp b/src/lib/mac/mac.cpp
index 8c1185c55..bb5643b59 100644
--- a/src/lib/mac/mac.cpp
+++ b/src/lib/mac/mac.cpp
@@ -38,7 +38,7 @@ namespace Botan {
std::unique_ptr<MessageAuthenticationCode> MessageAuthenticationCode::create(const std::string& algo_spec,
const std::string& provider)
{
- return std::unique_ptr<MessageAuthenticationCode>(make_a<MessageAuthenticationCode>(algo_spec, provider));
+ return std::unique_ptr<MessageAuthenticationCode>(make_a<MessageAuthenticationCode>(Botan::MessageAuthenticationCode::Spec(algo_spec), provider));
}
std::vector<std::string> MessageAuthenticationCode::providers(const std::string& algo_spec)