mbed TLS v2.6.0
entropy_poll.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_ENTROPY_POLL_H
26 #define MBEDTLS_ENTROPY_POLL_H
27 
28 #if !defined(MBEDTLS_CONFIG_FILE)
29 #include "config.h"
30 #else
31 #include MBEDTLS_CONFIG_FILE
32 #endif
33 
34 #include <stddef.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*
41  * Default thresholds for built-in sources, in bytes
42  */
43 #define MBEDTLS_ENTROPY_MIN_PLATFORM 32
44 #define MBEDTLS_ENTROPY_MIN_HAVEGE 32
45 #define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4
46 #if !defined(MBEDTLS_ENTROPY_MIN_HARDWARE)
47 #define MBEDTLS_ENTROPY_MIN_HARDWARE 32
48 #endif
49 
53 #if defined(MBEDTLS_TEST_NULL_ENTROPY)
54  int mbedtls_null_entropy_poll( void *data,
55  unsigned char *output, size_t len, size_t *olen );
56 #endif
57 
58 #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
59 
62 int mbedtls_platform_entropy_poll( void *data,
63  unsigned char *output, size_t len, size_t *olen );
64 #endif
65 
66 #if defined(MBEDTLS_HAVEGE_C)
67 
72 int mbedtls_havege_poll( void *data,
73  unsigned char *output, size_t len, size_t *olen );
74 #endif
75 
76 #if defined(MBEDTLS_TIMING_C)
77 
80 int mbedtls_hardclock_poll( void *data,
81  unsigned char *output, size_t len, size_t *olen );
82 #endif
83 
84 #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
85 
93 int mbedtls_hardware_poll( void *data,
94  unsigned char *output, size_t len, size_t *olen );
95 #endif
96 
97 #if defined(MBEDTLS_ENTROPY_NV_SEED)
98 
103 int mbedtls_nv_seed_poll( void *data,
104  unsigned char *output, size_t len, size_t *olen );
105 #endif
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* entropy_poll.h */
int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen)
Entropy poll callback that provides 0 entropy.
int mbedtls_hardclock_poll(void *data, unsigned char *output, size_t len, size_t *olen)
mbedtls_timing_hardclock-based entropy poll callback
Configuration options (set of defines)