From 69d2cd919c698a6b138b2ccba0de5d5aa2a33a03 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sun, 1 Feb 2015 23:46:07 +0000 Subject: Add missing files. Remove cipher lookup from engine code. --- src/lib/mac/mac_utils.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/lib/mac/mac_utils.h (limited to 'src/lib/mac/mac_utils.h') diff --git a/src/lib/mac/mac_utils.h b/src/lib/mac/mac_utils.h new file mode 100644 index 000000000..84c954789 --- /dev/null +++ b/src/lib/mac/mac_utils.h @@ -0,0 +1,35 @@ +/* +* Authentication Code Utility Header +* (C) 2015 Jack Lloyd +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +#ifndef BOTAN_MAC_UTIL_H__ +#define BOTAN_MAC_UTIL_H__ + +#include +#include +#include +#include +#include + +namespace Botan { + +#define BOTAN_REGISTER_MAC(name, maker) BOTAN_REGISTER_T(MessageAuthenticationCode, name, maker) +#define BOTAN_REGISTER_MAC_NOARGS(name) BOTAN_REGISTER_T_NOARGS(MessageAuthenticationCode, name) + +#define BOTAN_REGISTER_MAC_1LEN(name, def) BOTAN_REGISTER_T_1LEN(MessageAuthenticationCode, name, def) + +#define BOTAN_REGISTER_MAC_NAMED_NOARGS(type, name) \ + BOTAN_REGISTER_NAMED_T(MessageAuthenticationCode, name, type, make_new_T) + +#define BOTAN_REGISTER_MAC_NAMED_1LEN(type, name, def) \ + BOTAN_REGISTER_NAMED_T(MessageAuthenticationCode, name, type, (make_new_T_1len)) +#define BOTAN_REGISTER_MAC_NAMED_1STR(type, name, def) \ + BOTAN_REGISTER_NAMED_T(MessageAuthenticationCode, name, type, \ + std::bind(make_new_T_1str, std::placeholders::_1, def)); + +} + +#endif -- cgit v1.2.3