/*#*
*#* $Log$
- *#* Revision 1.1 2007/02/08 11:13:40 asterix
- *#* Add function prototypes.
+ *#* Revision 1.2 2007/02/08 11:53:03 asterix
+ *#* Add EntrPool struct. Typos.
*#*
*#*/
#include "randpool.h"
+#include "md2.h"
#include <cfg/compiler.h>
#include <cfg/debug.h> //ASSERT()
+static void stir(EntrPool *pool)
+{
+}
+
+void init_pool(EntrPool *pool);
+{
+}
-void add_entropy(void *data, size_t n_bit)
+void add_data(EntrPool *pool, void *data, size_t n_bit);
{
}
-size_t pool_size(void)
+size_t pool_size(EntrPool *pool);
{
}
-void get_bit(void *data, size_t n_bit)
+void get_bit(EntrPool *pool, void *data, size_t n_bit);
{
}
-void get_bit_n(void *data, size_t n_bit)
+void get_bit_n(EntrPool *pool, void *data, size_t n_bit);
{
}
-bool save_pool(void)
+bool save_pool(void *data);
{
}
-uint8_t load_pool(void)
+uint8_t *load_pool(void);
{
}
/*#*
*#* $Log$
+ *#* Revision 1.2 2007/02/08 11:53:03 asterix
+ *#* Add EntrPool struct. Typos.
+ *#*
*#* Revision 1.1 2007/02/08 11:13:41 asterix
*#* Add function prototypes.
*#*
#include <cfg/compiler.h>
#include <appconfig.h>
-
/**
+ * Sturct data of entropy pool.
*/
-void add_entropy(void *data, size_t n_bit);
-size_t pool_size(void);
-void get_bit(void *data, size_t n_bit);
-void get_bit_n(void *data, size_t n_bit);
-bool save_pool(void);
-uint8_t load_pool(void);
+typedef struct EntrPool
+{
+ size_t entropy; ///< Actual value of entropy.
+ size_t pool_pos; ///< Actual size of entropy pool.
+ size_t counter; ///< Counter.
+ uint8_t pool_entropy[CONFIG_SIZE_ENTROPY_POOL]; ///< Entropy pool.
+
+} EntrPool;
+
+void init_pool(EntrPool *pool);
+void add_data(EntrPool *pool, void *data, size_t n_bit);
+size_t pool_size(EntrPool *pool);
+void get_bit(EntrPool *pool, void *data, size_t n_bit);
+void get_bit_n(EntrPool *pool, void *data, size_t n_bit);
+bool save_pool(void *data);
+uint8_t *load_pool(void);
#endif /* RANDPOOL_H */