mbed TLS v2.0.0
entropy_poll.h
Go to the documentation of this file.
1 
24 #ifndef MBEDTLS_ENTROPY_POLL_H
25 #define MBEDTLS_ENTROPY_POLL_H
26 
27 #if !defined(MBEDTLS_CONFIG_FILE)
28 #include "config.h"
29 #else
30 #include MBEDTLS_CONFIG_FILE
31 #endif
32 
33 #include <stddef.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  * Default thresholds for built-in sources, in bytes
41  */
42 #define MBEDTLS_ENTROPY_MIN_PLATFORM 32
43 #define MBEDTLS_ENTROPY_MIN_HAVEGE 32
44 #define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4
45 #define MBEDTLS_ENTROPY_MIN_HARDWARE 32
47 #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
48 
51 int mbedtls_platform_entropy_poll( void *data,
52  unsigned char *output, size_t len, size_t *olen );
53 #endif
54 
55 #if defined(MBEDTLS_HAVEGE_C)
56 
61 int mbedtls_havege_poll( void *data,
62  unsigned char *output, size_t len, size_t *olen );
63 #endif
64 
65 #if defined(MBEDTLS_TIMING_C)
66 
69 int mbedtls_hardclock_poll( void *data,
70  unsigned char *output, size_t len, size_t *olen );
71 #endif
72 
73 #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
74 
82 int mbedtls_hardware_poll( void *data,
83  unsigned char *output, size_t len, size_t *olen );
84 #endif
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* entropy_poll.h */
int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen)
Platform-specific entropy poll callback.
int mbedtls_hardclock_poll(void *data, unsigned char *output, size_t len, size_t *olen)
mbedtls_timing_hardclock-based entropy poll callback
Compatibility names (set of defines)