aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac/cbc_mac/cbc_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/mac/cbc_mac/cbc_mac.cpp')
-rw-r--r--src/lib/mac/cbc_mac/cbc_mac.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/mac/cbc_mac/cbc_mac.cpp b/src/lib/mac/cbc_mac/cbc_mac.cpp
index e8fc394fa..d893b922f 100644
--- a/src/lib/mac/cbc_mac/cbc_mac.cpp
+++ b/src/lib/mac/cbc_mac/cbc_mac.cpp
@@ -5,12 +5,20 @@
* Botan is released under the Simplified BSD License (see license.txt)
*/
+#include <botan/internal/mac_utils.h>
#include <botan/cbc_mac.h>
-#include <botan/internal/xor_buf.h>
-#include <algorithm>
namespace Botan {
+CBC_MAC* CBC_MAC::make(const Spec& spec)
+ {
+ if(spec.arg_count() == 1)
+ return new CBC_MAC(Algo_Registry<BlockCipher>::global_registry().make(spec.arg(0)));
+ return nullptr;
+ }
+
+BOTAN_REGISTER_NAMED_T(MessageAuthenticationCode, "CBC-MAC", CBC_MAC, CBC_MAC::make);
+
/*
* Update an CBC-MAC Calculation
*/