PolarSSL v1.1.4
entropy_poll.h
Go to the documentation of this file.
00001 
00027 #ifndef POLARSSL_ENTROPY_POLL_H
00028 #define POLARSSL_ENTROPY_POLL_H
00029 
00030 #include <string.h>
00031 
00032 #include "config.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /*
00039  * Default thresholds for built-in sources
00040  */
00041 #define ENTROPY_MIN_PLATFORM    128     
00042 #define ENTROPY_MIN_HAVEGE      128     
00043 #define ENTROPY_MIN_HARDCLOCK    32     
00045 #if !defined(POLARSSL_NO_PLATFORM_ENTROPY)
00046 
00049 int platform_entropy_poll( void *data,
00050                            unsigned char *output, size_t len, size_t *olen );
00051 #endif
00052 
00053 #if defined(POLARSSL_HAVEGE_C)
00054 
00059 int havege_poll( void *data,
00060                  unsigned char *output, size_t len, size_t *olen );
00061 #endif
00062 
00063 #if defined(POLARSSL_TIMING_C)
00064 
00067 int hardclock_poll( void *data,
00068                     unsigned char *output, size_t len, size_t *olen );
00069 #endif
00070 
00071 #ifdef __cplusplus
00072 }
00073 #endif
00074 
00075 #endif /* entropy_poll.h */