Botan  1.11.15
src/lib/hash/hash_utils.h
Go to the documentation of this file.
00001 /*
00002 * Hash Utility Header
00003 * (C) 2015 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_HASH_UTILS_H__
00009 #define BOTAN_HASH_UTILS_H__
00010 
00011 #include <botan/hash.h>
00012 #include <botan/internal/algo_registry.h>
00013 #include <botan/loadstor.h>
00014 #include <botan/rotate.h>
00015 
00016 namespace Botan {
00017 
00018 #define BOTAN_REGISTER_HASH(name, maker) BOTAN_REGISTER_T(HashFunction, name, maker)
00019 #define BOTAN_REGISTER_HASH_NOARGS(name) BOTAN_REGISTER_T_NOARGS(HashFunction, name)
00020 
00021 #define BOTAN_REGISTER_HASH_1LEN(name, def) BOTAN_REGISTER_T_1LEN(HashFunction, name, def)
00022 
00023 #define BOTAN_REGISTER_HASH_NAMED_NOARGS(type, name) \
00024    BOTAN_REGISTER_NAMED_T(HashFunction, name, type, make_new_T<type>)
00025 #define BOTAN_REGISTER_HASH_NAMED_1LEN(type, name, def) \
00026    BOTAN_REGISTER_NAMED_T(HashFunction, name, type, (make_new_T_1len<type,def>))
00027 
00028 #define BOTAN_REGISTER_HASH_NOARGS_IF(cond, type, name, provider, pref)      \
00029    BOTAN_COND_REGISTER_NAMED_T_NOARGS(cond, HashFunction, type, name, provider, pref)
00030 
00031 }
00032 
00033 #endif