mbed TLS v2.3.0
entropy_poll.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_ENTROPY_POLL_H
24 #define MBEDTLS_ENTROPY_POLL_H
25 
26 #if !defined(MBEDTLS_CONFIG_FILE)
27 #include "config.h"
28 #else
29 #include MBEDTLS_CONFIG_FILE
30 #endif
31 
32 #include <stddef.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * Default thresholds for built-in sources, in bytes
40  */
41 #define MBEDTLS_ENTROPY_MIN_PLATFORM 32
42 #define MBEDTLS_ENTROPY_MIN_HAVEGE 32
43 #define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4
44 #define MBEDTLS_ENTROPY_MIN_HARDWARE 32
49 #if defined(MBEDTLS_TEST_NULL_ENTROPY)
50  int mbedtls_null_entropy_poll( void *data,
51  unsigned char *output, size_t len, size_t *olen );
52 #endif
53 
54 #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
55 
58 int mbedtls_platform_entropy_poll( void *data,
59  unsigned char *output, size_t len, size_t *olen );
60 #endif
61 
62 #if defined(MBEDTLS_HAVEGE_C)
63 
68 int mbedtls_havege_poll( void *data,
69  unsigned char *output, size_t len, size_t *olen );
70 #endif
71 
72 #if defined(MBEDTLS_TIMING_C)
73 
76 int mbedtls_hardclock_poll( void *data,
77  unsigned char *output, size_t len, size_t *olen );
78 #endif
79 
80 #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
81 
89 int mbedtls_hardware_poll( void *data,
90  unsigned char *output, size_t len, size_t *olen );
91 #endif
92 
93 #if defined(MBEDTLS_ENTROPY_NV_SEED)
94 
99 int mbedtls_nv_seed_poll( void *data,
100  unsigned char *output, size_t len, size_t *olen );
101 #endif
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #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)