-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMySource.cpp
More file actions
46 lines (37 loc) · 745 Bytes
/
MySource.cpp
File metadata and controls
46 lines (37 loc) · 745 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
41
42
43
44
45
46
/*
* File: MyPool.cpp
* Author: matt
*
* Created on 24 November 2014, 08:45
*/
#include "MySource.h"
MySource::MySource()
:poolNumber(0x0)
,returnValue(new uint8_t[2])
{
}
MySource::~MySource()
{
delete[] returnValue;
}
uint8_t* MySource::getEntropy(uint8_t* retPoolNumber, uint8_t* retEntropySize)
{
*retPoolNumber = poolNumber;
if(poolNumber >= 31)
{
poolNumber = 0;
}
else
{
++poolNumber;
}
*retEntropySize = 16;
delete[] returnValue;
returnValue = new uint8_t[4];
returnValue[0] = 0x21;
returnValue[1] = 0x43;
returnValue[2] = 0x65;
returnValue[3] = 0x87;
uint8_t *ptrReturnValue = returnValue;
return ptrReturnValue;
}