Go to the documentation of this file.
27 #ifndef POLARSSL_ENTROPY_H
28 #define POLARSSL_ENTROPY_H
34 #if defined(POLARSSL_SHA512_C)
36 #define POLARSSL_ENTROPY_SHA512_ACCUMULATOR
38 #if defined(POLARSSL_SHA256_C)
39 #define POLARSSL_ENTROPY_SHA256_ACCUMULATOR
44 #if defined(POLARSSL_THREADING_C)
48 #if defined(POLARSSL_HAVEGE_C)
52 #define POLARSSL_ERR_ENTROPY_SOURCE_FAILED -0x003C
53 #define POLARSSL_ERR_ENTROPY_MAX_SOURCES -0x003E
54 #define POLARSSL_ERR_ENTROPY_NO_SOURCES_DEFINED -0x0040
56 #if !defined(POLARSSL_CONFIG_OPTIONS)
57 #define ENTROPY_MAX_SOURCES 20
58 #define ENTROPY_MAX_GATHER 128
61 #if defined(POLARSSL_ENTROPY_SHA512_ACCUMULATOR)
62 #define ENTROPY_BLOCK_SIZE 64
64 #define ENTROPY_BLOCK_SIZE 32
67 #define ENTROPY_SOURCE_MANUAL ENTROPY_MAX_SOURCES
84 typedef int (*
f_source_ptr)(
void *,
unsigned char *, size_t,
size_t *);
103 #if defined(POLARSSL_ENTROPY_SHA512_ACCUMULATOR)
110 #if defined(POLARSSL_HAVEGE_C)
113 #if defined(POLARSSL_THREADING_C)
114 threading_mutex_t mutex;
167 int entropy_func(
void *data,
unsigned char *output,
size_t len );
179 const unsigned char *data,
size_t len );