aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--checks/cvc_tests.cpp2
-rw-r--r--src/alloc/mem_pool/mem_pool.cpp2
-rw-r--r--src/benchmark/benchmark.cpp1
-rw-r--r--src/cert/cvc/cvc_ca.cpp1
-rw-r--r--src/cert/cvc/cvc_self.cpp2
-rw-r--r--src/cert/x509/crl_ent.cpp2
-rw-r--r--src/cert/x509/x509_ca.cpp2
-rw-r--r--src/cert/x509/x509opt.cpp4
-rw-r--r--src/cert/x509/x509stor.cpp2
-rw-r--r--src/math/bigint/bigint.cpp2
-rw-r--r--src/math/numbertheory/mp_numth.cpp2
-rw-r--r--src/modes/mode_pad/mode_pad.cpp1
-rw-r--r--src/pubkey/dh/dh.cpp2
-rw-r--r--src/pubkey/dl_group/dl_group.cpp2
-rw-r--r--src/pubkey/ecc_key/ecc_key.cpp1
-rw-r--r--src/pubkey/ecdsa/ecdsa.cpp1
-rw-r--r--src/pubkey/eckaeg/eckaeg.cpp1
-rw-r--r--src/pubkey/elgamal/elgamal.cpp2
-rw-r--r--src/pubkey/info.txt2
-rw-r--r--src/pubkey/workfactor.cpp (renamed from src/utils/util.cpp)5
-rw-r--r--src/pubkey/workfactor.h22
-rw-r--r--src/rng/hmac_rng/hmac_rng.cpp1
-rw-r--r--src/rng/randpool/randpool.cpp2
-rw-r--r--src/timer/gettimeofday/tm_unix.cpp1
-rw-r--r--src/timer/posix_rt/tm_posix.cpp1
-rw-r--r--src/timer/timer.cpp1
-rw-r--r--src/timer/timer.h5
-rw-r--r--src/utils/info.txt3
-rw-r--r--src/utils/rounding.h (renamed from src/utils/util.h)16
29 files changed, 50 insertions, 41 deletions
diff --git a/checks/cvc_tests.cpp b/checks/cvc_tests.cpp
index 792e9c58d..d62099b6e 100644
--- a/checks/cvc_tests.cpp
+++ b/checks/cvc_tests.cpp
@@ -27,7 +27,7 @@
#include <botan/look_pk.h>
#include <botan/cvc_self.h>
#include <botan/cvc_cert.h>
-#include <botan/util.h>
+#include <botan/timer.h>
#include <botan/cvc_ado.h>
#define TEST_DATA_DIR "checks/ecc_testdata"
diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp
index 38e0c3285..dabf5e310 100644
--- a/src/alloc/mem_pool/mem_pool.cpp
+++ b/src/alloc/mem_pool/mem_pool.cpp
@@ -8,7 +8,7 @@
*/
#include <botan/mem_pool.h>
-#include <botan/util.h>
+#include <botan/rounding.h>
#include <botan/mem_ops.h>
#include <algorithm>
#include <exception>
diff --git a/src/benchmark/benchmark.cpp b/src/benchmark/benchmark.cpp
index 3bbc1f883..9be845974 100644
--- a/src/benchmark/benchmark.cpp
+++ b/src/benchmark/benchmark.cpp
@@ -11,7 +11,6 @@
#include <botan/stream_cipher.h>
#include <botan/hash.h>
#include <botan/mac.h>
-#include <botan/util.h>
#include <memory>
namespace Botan {
diff --git a/src/cert/cvc/cvc_ca.cpp b/src/cert/cvc/cvc_ca.cpp
index 638d3f984..8ca8db0c2 100644
--- a/src/cert/cvc/cvc_ca.cpp
+++ b/src/cert/cvc/cvc_ca.cpp
@@ -1,7 +1,6 @@
#include <botan/cvc_ca.h>
#include <botan/cvc_cert.h>
#include <botan/der_enc.h>
-#include <botan/util.h>
#include <botan/oids.h>
namespace Botan {
diff --git a/src/cert/cvc/cvc_self.cpp b/src/cert/cvc/cvc_self.cpp
index 91ea38724..777347a18 100644
--- a/src/cert/cvc/cvc_self.cpp
+++ b/src/cert/cvc/cvc_self.cpp
@@ -14,7 +14,7 @@
#include <botan/look_pk.h>
#include <botan/cvc_req.h>
#include <botan/cvc_ado.h>
-#include <botan/util.h>
+#include <botan/timer.h>
#include <sstream>
namespace Botan {
diff --git a/src/cert/x509/crl_ent.cpp b/src/cert/x509/crl_ent.cpp
index afea8cf6b..a8a989c24 100644
--- a/src/cert/x509/crl_ent.cpp
+++ b/src/cert/x509/crl_ent.cpp
@@ -11,7 +11,7 @@
#include <botan/ber_dec.h>
#include <botan/bigint.h>
#include <botan/oids.h>
-#include <botan/util.h>
+#include <botan/timer.h>
namespace Botan {
diff --git a/src/cert/x509/x509_ca.cpp b/src/cert/x509/x509_ca.cpp
index 41e314724..f0eb9c3e5 100644
--- a/src/cert/x509/x509_ca.cpp
+++ b/src/cert/x509/x509_ca.cpp
@@ -13,7 +13,7 @@
#include <botan/bigint.h>
#include <botan/parsing.h>
#include <botan/oids.h>
-#include <botan/util.h>
+#include <botan/timer.h>
#include <algorithm>
#include <typeinfo>
#include <iterator>
diff --git a/src/cert/x509/x509opt.cpp b/src/cert/x509/x509opt.cpp
index de9d589a3..988ab2cfa 100644
--- a/src/cert/x509/x509opt.cpp
+++ b/src/cert/x509/x509opt.cpp
@@ -6,9 +6,9 @@
*/
#include <botan/x509self.h>
-#include <botan/util.h>
-#include <botan/parsing.h>
#include <botan/oids.h>
+#include <botan/parsing.h>
+#include <botan/timer.h>
#include <ctime>
namespace Botan {
diff --git a/src/cert/x509/x509stor.cpp b/src/cert/x509/x509stor.cpp
index cb61bc2d2..40801148c 100644
--- a/src/cert/x509/x509stor.cpp
+++ b/src/cert/x509/x509stor.cpp
@@ -10,7 +10,7 @@
#include <botan/pubkey.h>
#include <botan/look_pk.h>
#include <botan/oids.h>
-#include <botan/util.h>
+#include <botan/timer.h>
#include <algorithm>
#include <memory>
diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp
index 926bedc02..63bdc3605 100644
--- a/src/math/bigint/bigint.cpp
+++ b/src/math/bigint/bigint.cpp
@@ -9,7 +9,7 @@
#include <botan/mp_core.h>
#include <botan/loadstor.h>
#include <botan/parsing.h>
-#include <botan/util.h>
+#include <botan/rounding.h>
namespace Botan {
diff --git a/src/math/numbertheory/mp_numth.cpp b/src/math/numbertheory/mp_numth.cpp
index 45a398440..2cb36b8a3 100644
--- a/src/math/numbertheory/mp_numth.cpp
+++ b/src/math/numbertheory/mp_numth.cpp
@@ -7,7 +7,7 @@
#include <botan/numthry.h>
#include <botan/mp_core.h>
-#include <botan/util.h>
+#include <botan/rounding.h>
#include <algorithm>
namespace Botan {
diff --git a/src/modes/mode_pad/mode_pad.cpp b/src/modes/mode_pad/mode_pad.cpp
index b8badd7a7..2204c28b5 100644
--- a/src/modes/mode_pad/mode_pad.cpp
+++ b/src/modes/mode_pad/mode_pad.cpp
@@ -7,7 +7,6 @@
#include <botan/mode_pad.h>
#include <botan/exceptn.h>
-#include <botan/util.h>
namespace Botan {
diff --git a/src/pubkey/dh/dh.cpp b/src/pubkey/dh/dh.cpp
index 0c9d02f0e..149bc5882 100644
--- a/src/pubkey/dh/dh.cpp
+++ b/src/pubkey/dh/dh.cpp
@@ -7,7 +7,7 @@
#include <botan/dh.h>
#include <botan/numthry.h>
-#include <botan/util.h>
+#include <botan/workfactor.h>
namespace Botan {
diff --git a/src/pubkey/dl_group/dl_group.cpp b/src/pubkey/dl_group/dl_group.cpp
index 81c5d5e1d..13ea03016 100644
--- a/src/pubkey/dl_group/dl_group.cpp
+++ b/src/pubkey/dl_group/dl_group.cpp
@@ -12,7 +12,7 @@
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/pipe.h>
-#include <botan/util.h>
+#include <botan/workfactor.h>
#include <botan/pem.h>
namespace Botan {
diff --git a/src/pubkey/ecc_key/ecc_key.cpp b/src/pubkey/ecc_key/ecc_key.cpp
index 615efecf1..677a5088e 100644
--- a/src/pubkey/ecc_key/ecc_key.cpp
+++ b/src/pubkey/ecc_key/ecc_key.cpp
@@ -10,7 +10,6 @@
#include <botan/ecc_key.h>
#include <botan/x509_key.h>
#include <botan/numthry.h>
-#include <botan/util.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/secmem.h>
diff --git a/src/pubkey/ecdsa/ecdsa.cpp b/src/pubkey/ecdsa/ecdsa.cpp
index 9640c6397..ea2c35a19 100644
--- a/src/pubkey/ecdsa/ecdsa.cpp
+++ b/src/pubkey/ecdsa/ecdsa.cpp
@@ -9,7 +9,6 @@
#include <botan/ecdsa.h>
#include <botan/numthry.h>
-#include <botan/util.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/secmem.h>
diff --git a/src/pubkey/eckaeg/eckaeg.cpp b/src/pubkey/eckaeg/eckaeg.cpp
index b8ff75d89..dc6eb925b 100644
--- a/src/pubkey/eckaeg/eckaeg.cpp
+++ b/src/pubkey/eckaeg/eckaeg.cpp
@@ -9,7 +9,6 @@
#include <botan/eckaeg.h>
#include <botan/numthry.h>
-#include <botan/util.h>
#include <botan/der_enc.h>
#include <botan/ber_dec.h>
#include <botan/secmem.h>
diff --git a/src/pubkey/elgamal/elgamal.cpp b/src/pubkey/elgamal/elgamal.cpp
index 1f79df57a..8c07c5735 100644
--- a/src/pubkey/elgamal/elgamal.cpp
+++ b/src/pubkey/elgamal/elgamal.cpp
@@ -9,7 +9,7 @@
#include <botan/numthry.h>
#include <botan/keypair.h>
#include <botan/look_pk.h>
-#include <botan/util.h>
+#include <botan/workfactor.h>
namespace Botan {
diff --git a/src/pubkey/info.txt b/src/pubkey/info.txt
index ee8da5b9d..63af86c47 100644
--- a/src/pubkey/info.txt
+++ b/src/pubkey/info.txt
@@ -15,6 +15,8 @@ pubkey.cpp
pubkey.h
pubkey_enums.cpp
pubkey_enums.h
+workfactor.cpp
+workfactor.h
</add>
<requires>
diff --git a/src/utils/util.cpp b/src/pubkey/workfactor.cpp
index 09ac9f1ca..e40b7919c 100644
--- a/src/utils/util.cpp
+++ b/src/pubkey/workfactor.cpp
@@ -1,11 +1,11 @@
/*
-* Utility Functions
+* Public Key Work Factor Functions
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
-#include <botan/util.h>
+#include <botan/workfactor.h>
#include <algorithm>
#include <cmath>
@@ -47,4 +47,5 @@ u32bit dl_work_factor(u32bit bits)
#endif
}
+
}
diff --git a/src/pubkey/workfactor.h b/src/pubkey/workfactor.h
new file mode 100644
index 000000000..653f697e3
--- /dev/null
+++ b/src/pubkey/workfactor.h
@@ -0,0 +1,22 @@
+/*
+* Public Key Work Factor Functions
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_WORKFACTOR_H__
+#define BOTAN_WORKFACTOR_H__
+
+#include <botan/types.h>
+
+namespace Botan {
+
+/*
+* Work Factor Estimates
+*/
+BOTAN_DLL u32bit dl_work_factor(u32bit prime_group_size);
+
+}
+
+#endif
diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp
index 113489db3..8444b1083 100644
--- a/src/rng/hmac_rng/hmac_rng.cpp
+++ b/src/rng/hmac_rng/hmac_rng.cpp
@@ -8,7 +8,6 @@
#include <botan/hmac_rng.h>
#include <botan/loadstor.h>
#include <botan/xor_buf.h>
-#include <botan/util.h>
#include <botan/stl_util.h>
#include <algorithm>
diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp
index 77a5228c6..fe83f4361 100644
--- a/src/rng/randpool/randpool.cpp
+++ b/src/rng/randpool/randpool.cpp
@@ -8,7 +8,7 @@
#include <botan/randpool.h>
#include <botan/loadstor.h>
#include <botan/xor_buf.h>
-#include <botan/util.h>
+#include <botan/timer.h>
#include <botan/stl_util.h>
#include <algorithm>
diff --git a/src/timer/gettimeofday/tm_unix.cpp b/src/timer/gettimeofday/tm_unix.cpp
index e32df7166..9d8ac4a04 100644
--- a/src/timer/gettimeofday/tm_unix.cpp
+++ b/src/timer/gettimeofday/tm_unix.cpp
@@ -6,7 +6,6 @@
*/
#include <botan/tm_unix.h>
-#include <botan/util.h>
#include <sys/time.h>
namespace Botan {
diff --git a/src/timer/posix_rt/tm_posix.cpp b/src/timer/posix_rt/tm_posix.cpp
index d356384ab..96182025c 100644
--- a/src/timer/posix_rt/tm_posix.cpp
+++ b/src/timer/posix_rt/tm_posix.cpp
@@ -6,7 +6,6 @@
*/
#include <botan/tm_posix.h>
-#include <botan/util.h>
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199309
diff --git a/src/timer/timer.cpp b/src/timer/timer.cpp
index 035c217f9..e3e3c5a16 100644
--- a/src/timer/timer.cpp
+++ b/src/timer/timer.cpp
@@ -7,7 +7,6 @@
#include <botan/timer.h>
#include <botan/loadstor.h>
-#include <botan/util.h>
#include <ctime>
namespace Botan {
diff --git a/src/timer/timer.h b/src/timer/timer.h
index b6e8ef448..3bbe85a5e 100644
--- a/src/timer/timer.h
+++ b/src/timer/timer.h
@@ -12,6 +12,11 @@
namespace Botan {
+/*
+* Time Access Functions
+*/
+BOTAN_DLL u64bit system_time();
+
/**
* Timer Interface
*/
diff --git a/src/utils/info.txt b/src/utils/info.txt
index bf9778369..68981729f 100644
--- a/src/utils/info.txt
+++ b/src/utils/info.txt
@@ -22,12 +22,11 @@ mlock.cpp
parsing.cpp
parsing.h
rotate.h
+rounding.h
stl_util.h
types.h
ui.cpp
ui.h
-util.cpp
-util.h
version.cpp
version.h
xor_buf.h
diff --git a/src/utils/util.h b/src/utils/rounding.h
index e3dadc64b..11ab90b8d 100644
--- a/src/utils/util.h
+++ b/src/utils/rounding.h
@@ -1,23 +1,18 @@
/*
-* Utility Functions
+* Integer Rounding Functions
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
-#ifndef BOTAN_UTIL_H__
-#define BOTAN_UTIL_H__
+#ifndef BOTAN_ROUNDING_H__
+#define BOTAN_ROUNDING_H__
#include <botan/types.h>
namespace Botan {
/*
-* Time Access Functions
-*/
-BOTAN_DLL u64bit system_time();
-
-/*
* Round up n to multiple of align_to
*/
inline u32bit round_up(u32bit n, u32bit align_to)
@@ -35,11 +30,6 @@ inline u32bit round_down(u32bit n, u32bit align_to)
return (n - (n % align_to));
}
-/*
-* Work Factor Estimates
-*/
-BOTAN_DLL u32bit dl_work_factor(u32bit);
-
}
#endif