aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hash')
-rw-r--r--src/lib/hash/checksum/adler32/adler32.cpp2
-rw-r--r--src/lib/hash/checksum/crc24/crc24.cpp3
-rw-r--r--src/lib/hash/checksum/crc32/crc32.cpp2
-rw-r--r--src/lib/hash/comb4p/comb4p.cpp1
-rw-r--r--src/lib/hash/gost_3411/gost_3411.cpp2
-rw-r--r--src/lib/hash/has160/has160.cpp1
-rw-r--r--src/lib/hash/hash.cpp15
-rw-r--r--src/lib/hash/hash_utils.h33
-rw-r--r--src/lib/hash/info.txt4
-rw-r--r--src/lib/hash/keccak/keccak.cpp2
-rw-r--r--src/lib/hash/md2/md2.cpp2
-rw-r--r--src/lib/hash/md4/md4.cpp1
-rw-r--r--src/lib/hash/md5/md5.cpp1
-rw-r--r--src/lib/hash/par_hash/par_hash.cpp1
-rw-r--r--src/lib/hash/rmd128/rmd128.cpp1
-rw-r--r--src/lib/hash/rmd160/rmd160.cpp1
-rw-r--r--src/lib/hash/sha1/sha160.cpp1
-rw-r--r--src/lib/hash/sha1_sse2/sha1_sse2.cpp1
-rw-r--r--src/lib/hash/sha2_32/sha2_32.cpp1
-rw-r--r--src/lib/hash/sha2_64/sha2_64.cpp1
-rw-r--r--src/lib/hash/skein/skein_512.cpp2
-rw-r--r--src/lib/hash/tiger/tiger.cpp1
-rw-r--r--src/lib/hash/whirlpool/whirlpool.cpp1
23 files changed, 17 insertions, 63 deletions
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 <botan/internal/hash_utils.h>
#include <botan/adler32.h>
+#include <botan/loadstor.h>
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 <botan/internal/hash_utils.h>
#include <botan/crc24.h>
-#include <botan/get_byte.h>
+#include <botan/loadstor.h>
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 <botan/internal/hash_utils.h>
#include <botan/crc32.h>
+#include <botan/loadstor.h>
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 <botan/comb4p.h>
-#include <botan/internal/xor_buf.h>
#include <stdexcept>
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 <botan/internal/hash_utils.h>
#include <botan/gost_3411.h>
-#include <botan/internal/xor_buf.h>
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 <botan/internal/hash_utils.h>
#include <botan/has160.h>
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 <botan/hash.h>
#include <botan/cpuid.h>
-#include <botan/internal/hash_utils.h>
+#include <botan/internal/algo_registry.h>
#if defined(BOTAN_HAS_ADLER32)
#include <botan/adler32.h>
@@ -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<type>)
+#define BOTAN_REGISTER_HASH_NAMED_1LEN(type, name, def) \
+ BOTAN_REGISTER_NAMED_T(HashFunction, name, type, (make_new_T_1len<type,def>))
+
+#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 <botan/hash.h>
-#include <botan/internal/algo_registry.h>
-#include <botan/loadstor.h>
-#include <botan/rotate.h>
-
-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<type>)
-#define BOTAN_REGISTER_HASH_NAMED_1LEN(type, name, def) \
- BOTAN_REGISTER_NAMED_T(HashFunction, name, type, (make_new_T_1len<type,def>))
-
-#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 @@
-<header:internal>
-hash_utils.h
-</header:internal>
-
<header:public>
hash.h
</header:public>
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 <botan/internal/hash_utils.h>
#include <botan/keccak.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
-#include <botan/internal/xor_buf.h>
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 <botan/internal/hash_utils.h>
#include <botan/md2.h>
-#include <botan/internal/xor_buf.h>
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 <botan/internal/hash_utils.h>
#include <botan/md4.h>
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 <botan/internal/hash_utils.h>
#include <botan/md5.h>
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 <botan/internal/hash_utils.h>
#include <botan/par_hash.h>
#include <botan/parsing.h>
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 <botan/internal/hash_utils.h>
#include <botan/rmd128.h>
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 <botan/internal/hash_utils.h>
#include <botan/rmd160.h>
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 <botan/internal/hash_utils.h>
#include <botan/sha160.h>
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 <botan/internal/hash_utils.h>
#include <botan/sha1_sse2.h>
#include <botan/cpuid.h>
#include <emmintrin.h>
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 <botan/internal/hash_utils.h>
#include <botan/sha2_32.h>
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 <botan/internal/hash_utils.h>
#include <botan/sha2_64.h>
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 <botan/internal/hash_utils.h>
#include <botan/skein_512.h>
#include <botan/parsing.h>
#include <botan/exceptn.h>
-#include <botan/internal/xor_buf.h>
#include <algorithm>
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 <botan/internal/hash_utils.h>
#include <botan/tiger.h>
#include <botan/exceptn.h>
#include <botan/parsing.h>
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 <botan/internal/hash_utils.h>
#include <botan/whrlpool.h>
namespace Botan {