blob: 3ad84b4a78d6ae678c32dc9b1677a61105c8d563 [file] [log] [blame]
Paul Bakker5121ce52009-01-03 21:22:43 +00001/**
2 * \file havege.h
3 */
4#ifndef XYSSL_HAVEGE_H
5#define XYSSL_HAVEGE_H
6
7#define COLLECT_SIZE 1024
8
9/**
10 * \brief HAVEGE state structure
11 */
12typedef struct
13{
14 int PT1, PT2, offset[2];
15 int pool[COLLECT_SIZE];
16 int WALK[8192];
17}
18havege_state;
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/**
25 * \brief HAVEGE initialization
26 *
27 * \param hs HAVEGE state to be initialized
28 */
29void havege_init( havege_state *hs );
30
31/**
32 * \brief HAVEGE rand function
33 *
34 * \param rng_st points to an HAVEGE state
35 *
36 * \return A random int
37 */
38int havege_rand( void *p_rng );
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif /* havege.h */