Remove tag files.
[bertos.git] / bertos / sec / random.c
index 69f3fed3b4392f6dcc80b4f16d6fca99bc83b062..67c24859529d9a2daee538418b0e8f3a7b062083 100644 (file)
 #include <sec/prng/isaac.h>
 #include <sec/prng/x917.h>
 #include <sec/prng/yarrow.h>
+#include <sec/entropy/yarrow_pool.h>
 
 /********************************************************************************/
 /* Configuration of the random module                                           */
 /********************************************************************************/
 
-#define POOL_CONTEXT          PP_CAT(PP_CAT(PRNG_NAME, CONFIG_RANDOM_POOL), Context)
-#define POOL_INIT             PP_CAT(PP_CAT(PRNG_NAME, CONFIG_RANDOM_POOL), _init)
+#define POOL_CONTEXT          PP_CAT(PP_CAT(POOL_NAMEU, CONFIG_RANDOM_POOL), Context)
+#define POOL_INIT             PP_CAT(PP_CAT(POOL_NAMEL, CONFIG_RANDOM_POOL), _init)
 
 #define EXTRACTOR_STACKINIT   PP_CAT(PP_CAT(EXTRACTOR_NAME, CONFIG_RANDOM_EXTRACTOR), _stackinit)
 
@@ -68,7 +69,7 @@
 
 #if CONFIG_RANDOM_POOL != POOL_NONE
 static POOL_CONTEXT epool_ctx;
-static EntropyPool_Context * const epool = (EntropyPool_Context *)&epool_ctx;
+static EntropyPool * const epool = (EntropyPool *)&epool_ctx;
 #endif
 
 static PRNG_CONTEXT prng_ctx;
@@ -95,7 +96,7 @@ static bool initialized = 0;
 static void optional_reseeding(void)
 {
 #if CONFIG_RANDOM_POOL != POOL_NONE
-       static ticks_t last_reseed = 0;
+       static ticks_t last_reseed = -1000;
 
        // We don't allow more than 10 reseedings per second
        // (as suggested by Fortuna)