aboutsummaryrefslogtreecommitdiffstats
path: root/include/util.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-05-18 18:33:19 +0000
committerlloyd <[email protected]>2006-05-18 18:33:19 +0000
commita2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch)
treead3d6c4fcc8dd0f403f8105598943616246fe172 /include/util.h
Initial checkin1.5.6
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
new file mode 100644
index 000000000..8e25db50c
--- /dev/null
+++ b/include/util.h
@@ -0,0 +1,40 @@
+/*************************************************
+* Utility Functions Header File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#ifndef BOTAN_UTIL_H__
+#define BOTAN_UTIL_H__
+
+#include <botan/types.h>
+
+namespace Botan {
+
+/*************************************************
+* Timer Access Functions *
+*************************************************/
+u64bit system_time();
+u64bit system_clock();
+
+/*************************************************
+* Memory Locking Functions *
+*************************************************/
+void lock_mem(void*, u32bit);
+void unlock_mem(void*, u32bit);
+
+/*************************************************
+* Misc Utility Functions *
+*************************************************/
+u32bit round_up(u32bit, u32bit);
+u32bit round_down(u32bit, u32bit);
+u64bit combine_timers(u32bit, u32bit, u32bit);
+
+/*************************************************
+* Work Factor Estimates *
+*************************************************/
+u32bit entropy_estimate(const byte[], u32bit);
+u32bit dl_work_factor(u32bit);
+
+}
+
+#endif