00001
00027 #ifndef POLARSSL_HAVEGE_H
00028 #define POLARSSL_HAVEGE_H
00029
00030 #include <string.h>
00031
00032 #define COLLECT_SIZE 1024
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00041 typedef struct
00042 {
00043 int PT1, PT2, offset[2];
00044 int pool[COLLECT_SIZE];
00045 int WALK[8192];
00046 }
00047 havege_state;
00048
00054 void havege_init( havege_state *hs );
00055
00065 int havege_random( void *p_rng, unsigned char *output, size_t len );
00066
00067 #ifdef __cplusplus
00068 }
00069 #endif
00070
00071 #endif