aboutsummaryrefslogtreecommitdiffstats
path: root/include/util.h
blob: 879acd1db0e05e0395db4692eab677b7fa04081f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*************************************************
* Utility Functions Header File                  *
* (C) 1999-2007 Jack Lloyd                       *
*************************************************/

#ifndef BOTAN_UTIL_H__
#define BOTAN_UTIL_H__

#include <botan/types.h>

namespace Botan {

/*************************************************
* Time Access Functions                          *
*************************************************/
BOTAN_DLL u64bit system_time();

/*************************************************
* Memory Locking Functions                       *
*************************************************/
BOTAN_DLL void lock_mem(void*, u32bit);
BOTAN_DLL void unlock_mem(void*, u32bit);

/*************************************************
* Misc Utility Functions                         *
*************************************************/
BOTAN_DLL u32bit round_up(u32bit, u32bit);
BOTAN_DLL u32bit round_down(u32bit, u32bit);

/*************************************************
* Work Factor Estimates                          *
*************************************************/
BOTAN_DLL u32bit entropy_estimate(const byte[], u32bit);
BOTAN_DLL u32bit dl_work_factor(u32bit);

}

#endif