-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccumulator.h
More file actions
41 lines (35 loc) · 796 Bytes
/
Accumulator.h
File metadata and controls
41 lines (35 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef ACCUMULATOR_H
#define ACCUMULATOR_H
#include "PRNGState.h"
#include "Source.h"
#include "SeedFile.h"
#include <inttypes.h>
#include <math.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "Time.h"
#include <Arduino.h>
#else
#include <time.h>
#include <stdlib.h>
#endif
#define POOL_COUNT 32
#define ENTROPY_SOURCE_MAX_SIZE 255
#define MIN_ENTROPY_POOL_SIZE 64
class Accumulator
{
public:
Accumulator();
~Accumulator();
//uint8_t* randomData(uint32_t numberOfBytes);
bool registerEntropySource(Source *source);
void addEventData(PRNGState *prngState);
private:
struct SourceNodeStruct
{
int sourceNumber;
Source *source;
SourceNodeStruct *next;
} *sourceNode;
uint8_t sourceDeviceCount;
};
#endif /* ACCUMULATOR_H */