From e1ae1d68309573134fc1242c3bfb8a8ce0672737 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sat, 19 Sep 2015 07:43:45 -0400 Subject: Internal header cleanups Only user-visible change is the removal of get_byte.h --- src/lib/hash/checksum/adler32/adler32.cpp | 2 +- src/lib/hash/checksum/crc24/crc24.cpp | 3 +-- src/lib/hash/checksum/crc32/crc32.cpp | 2 +- src/lib/hash/comb4p/comb4p.cpp | 1 - src/lib/hash/gost_3411/gost_3411.cpp | 2 -- src/lib/hash/has160/has160.cpp | 1 - src/lib/hash/hash.cpp | 15 +++++++++++++- src/lib/hash/hash_utils.h | 33 ------------------------------- src/lib/hash/info.txt | 4 ---- src/lib/hash/keccak/keccak.cpp | 2 -- src/lib/hash/md2/md2.cpp | 2 -- src/lib/hash/md4/md4.cpp | 1 - src/lib/hash/md5/md5.cpp | 1 - src/lib/hash/par_hash/par_hash.cpp | 1 - src/lib/hash/rmd128/rmd128.cpp | 1 - src/lib/hash/rmd160/rmd160.cpp | 1 - src/lib/hash/sha1/sha160.cpp | 1 - src/lib/hash/sha1_sse2/sha1_sse2.cpp | 1 - src/lib/hash/sha2_32/sha2_32.cpp | 1 - src/lib/hash/sha2_64/sha2_64.cpp | 1 - src/lib/hash/skein/skein_512.cpp | 2 -- src/lib/hash/tiger/tiger.cpp | 1 - src/lib/hash/whirlpool/whirlpool.cpp | 1 - 23 files changed, 17 insertions(+), 63 deletions(-) delete mode 100644 src/lib/hash/hash_utils.h (limited to 'src/lib/hash') diff --git a/src/lib/hash/checksum/adler32/adler32.cpp b/src/lib/hash/checksum/adler32/adler32.cpp index aadc5d39f..f368b627c 100644 --- a/src/lib/hash/checksum/adler32/adler32.cpp +++ b/src/lib/hash/checksum/adler32/adler32.cpp @@ -5,8 +5,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include +#include namespace Botan { diff --git a/src/lib/hash/checksum/crc24/crc24.cpp b/src/lib/hash/checksum/crc24/crc24.cpp index 054d23684..1484f643d 100644 --- a/src/lib/hash/checksum/crc24/crc24.cpp +++ b/src/lib/hash/checksum/crc24/crc24.cpp @@ -5,9 +5,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include -#include +#include namespace Botan { diff --git a/src/lib/hash/checksum/crc32/crc32.cpp b/src/lib/hash/checksum/crc32/crc32.cpp index ca9514c26..10d989cc6 100644 --- a/src/lib/hash/checksum/crc32/crc32.cpp +++ b/src/lib/hash/checksum/crc32/crc32.cpp @@ -5,8 +5,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include +#include namespace Botan { diff --git a/src/lib/hash/comb4p/comb4p.cpp b/src/lib/hash/comb4p/comb4p.cpp index ef5f74a38..4222eaf54 100644 --- a/src/lib/hash/comb4p/comb4p.cpp +++ b/src/lib/hash/comb4p/comb4p.cpp @@ -6,7 +6,6 @@ */ #include -#include #include namespace Botan { diff --git a/src/lib/hash/gost_3411/gost_3411.cpp b/src/lib/hash/gost_3411/gost_3411.cpp index fb1c39384..f8c9c0069 100644 --- a/src/lib/hash/gost_3411/gost_3411.cpp +++ b/src/lib/hash/gost_3411/gost_3411.cpp @@ -5,9 +5,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include -#include namespace Botan { diff --git a/src/lib/hash/has160/has160.cpp b/src/lib/hash/has160/has160.cpp index dd4bc1428..6b12e10ad 100644 --- a/src/lib/hash/has160/has160.cpp +++ b/src/lib/hash/has160/has160.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/hash.cpp b/src/lib/hash/hash.cpp index f965cfde8..fe210705e 100644 --- a/src/lib/hash/hash.cpp +++ b/src/lib/hash/hash.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #if defined(BOTAN_HAS_ADLER32) #include @@ -106,6 +106,19 @@ HashFunction::HashFunction() {} HashFunction::~HashFunction() {} +#define BOTAN_REGISTER_HASH(name, maker) BOTAN_REGISTER_T(HashFunction, name, maker) +#define BOTAN_REGISTER_HASH_NOARGS(name) BOTAN_REGISTER_T_NOARGS(HashFunction, name) + +#define BOTAN_REGISTER_HASH_1LEN(name, def) BOTAN_REGISTER_T_1LEN(HashFunction, name, def) + +#define BOTAN_REGISTER_HASH_NAMED_NOARGS(type, name) \ + BOTAN_REGISTER_NAMED_T(HashFunction, name, type, make_new_T) +#define BOTAN_REGISTER_HASH_NAMED_1LEN(type, name, def) \ + BOTAN_REGISTER_NAMED_T(HashFunction, name, type, (make_new_T_1len)) + +#define BOTAN_REGISTER_HASH_NOARGS_IF(cond, type, name, provider, pref) \ + BOTAN_COND_REGISTER_NAMED_T_NOARGS(cond, HashFunction, type, name, provider, pref) + #if defined(BOTAN_HAS_ADLER32) BOTAN_REGISTER_HASH_NOARGS(Adler32); #endif diff --git a/src/lib/hash/hash_utils.h b/src/lib/hash/hash_utils.h deleted file mode 100644 index 3286b0087..000000000 --- a/src/lib/hash/hash_utils.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -* Hash Utility Header -* (C) 2015 Jack Lloyd -* -* Botan is released under the Simplified BSD License (see license.txt) -*/ - -#ifndef BOTAN_HASH_UTILS_H__ -#define BOTAN_HASH_UTILS_H__ - -#include -#include -#include -#include - -namespace Botan { - -#define BOTAN_REGISTER_HASH(name, maker) BOTAN_REGISTER_T(HashFunction, name, maker) -#define BOTAN_REGISTER_HASH_NOARGS(name) BOTAN_REGISTER_T_NOARGS(HashFunction, name) - -#define BOTAN_REGISTER_HASH_1LEN(name, def) BOTAN_REGISTER_T_1LEN(HashFunction, name, def) - -#define BOTAN_REGISTER_HASH_NAMED_NOARGS(type, name) \ - BOTAN_REGISTER_NAMED_T(HashFunction, name, type, make_new_T) -#define BOTAN_REGISTER_HASH_NAMED_1LEN(type, name, def) \ - BOTAN_REGISTER_NAMED_T(HashFunction, name, type, (make_new_T_1len)) - -#define BOTAN_REGISTER_HASH_NOARGS_IF(cond, type, name, provider, pref) \ - BOTAN_COND_REGISTER_NAMED_T_NOARGS(cond, HashFunction, type, name, provider, pref) - -} - -#endif diff --git a/src/lib/hash/info.txt b/src/lib/hash/info.txt index 481b39b67..e71318b73 100644 --- a/src/lib/hash/info.txt +++ b/src/lib/hash/info.txt @@ -1,7 +1,3 @@ - -hash_utils.h - - hash.h diff --git a/src/lib/hash/keccak/keccak.cpp b/src/lib/hash/keccak/keccak.cpp index 3cebe42da..39d0c822b 100644 --- a/src/lib/hash/keccak/keccak.cpp +++ b/src/lib/hash/keccak/keccak.cpp @@ -5,11 +5,9 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include #include #include -#include namespace Botan { diff --git a/src/lib/hash/md2/md2.cpp b/src/lib/hash/md2/md2.cpp index 8b8810941..8fe016962 100644 --- a/src/lib/hash/md2/md2.cpp +++ b/src/lib/hash/md2/md2.cpp @@ -5,9 +5,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include -#include namespace Botan { diff --git a/src/lib/hash/md4/md4.cpp b/src/lib/hash/md4/md4.cpp index f8cbb2b6b..6f4503ac0 100644 --- a/src/lib/hash/md4/md4.cpp +++ b/src/lib/hash/md4/md4.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/md5/md5.cpp b/src/lib/hash/md5/md5.cpp index 61d8aa980..89ca52419 100644 --- a/src/lib/hash/md5/md5.cpp +++ b/src/lib/hash/md5/md5.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/par_hash/par_hash.cpp b/src/lib/hash/par_hash/par_hash.cpp index 57140f0a8..5e970ab13 100644 --- a/src/lib/hash/par_hash/par_hash.cpp +++ b/src/lib/hash/par_hash/par_hash.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include #include diff --git a/src/lib/hash/rmd128/rmd128.cpp b/src/lib/hash/rmd128/rmd128.cpp index 1f655199e..394bf2acf 100644 --- a/src/lib/hash/rmd128/rmd128.cpp +++ b/src/lib/hash/rmd128/rmd128.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/rmd160/rmd160.cpp b/src/lib/hash/rmd160/rmd160.cpp index c1b1032ae..56d063338 100644 --- a/src/lib/hash/rmd160/rmd160.cpp +++ b/src/lib/hash/rmd160/rmd160.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/sha1/sha160.cpp b/src/lib/hash/sha1/sha160.cpp index 04227c6bb..39d14f486 100644 --- a/src/lib/hash/sha1/sha160.cpp +++ b/src/lib/hash/sha1/sha160.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/sha1_sse2/sha1_sse2.cpp b/src/lib/hash/sha1_sse2/sha1_sse2.cpp index fefea52af..2e0688185 100644 --- a/src/lib/hash/sha1_sse2/sha1_sse2.cpp +++ b/src/lib/hash/sha1_sse2/sha1_sse2.cpp @@ -7,7 +7,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include #include #include diff --git a/src/lib/hash/sha2_32/sha2_32.cpp b/src/lib/hash/sha2_32/sha2_32.cpp index a867e6dd0..5215164cf 100644 --- a/src/lib/hash/sha2_32/sha2_32.cpp +++ b/src/lib/hash/sha2_32/sha2_32.cpp @@ -6,7 +6,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/sha2_64/sha2_64.cpp b/src/lib/hash/sha2_64/sha2_64.cpp index 98d16900b..d7c3f1325 100644 --- a/src/lib/hash/sha2_64/sha2_64.cpp +++ b/src/lib/hash/sha2_64/sha2_64.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { diff --git a/src/lib/hash/skein/skein_512.cpp b/src/lib/hash/skein/skein_512.cpp index ce0e8353d..fe95dd7a5 100644 --- a/src/lib/hash/skein/skein_512.cpp +++ b/src/lib/hash/skein/skein_512.cpp @@ -5,11 +5,9 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include #include #include -#include #include namespace Botan { diff --git a/src/lib/hash/tiger/tiger.cpp b/src/lib/hash/tiger/tiger.cpp index d724c3da8..79708a902 100644 --- a/src/lib/hash/tiger/tiger.cpp +++ b/src/lib/hash/tiger/tiger.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include #include #include diff --git a/src/lib/hash/whirlpool/whirlpool.cpp b/src/lib/hash/whirlpool/whirlpool.cpp index edcc31d26..9bebdfa7c 100644 --- a/src/lib/hash/whirlpool/whirlpool.cpp +++ b/src/lib/hash/whirlpool/whirlpool.cpp @@ -5,7 +5,6 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include namespace Botan { -- cgit v1.2.3