aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/util.h
blob: ac786739004a3d3d4cf0c1c85062b4e972c15293 (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
39
/*
* Utility Functions
* (C) 1999-2007 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/

#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 bool 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 dl_work_factor(u32bit);

}

#endif