Removed unrequired header definitions

This commit is contained in:
Patrick Siegl
2020-04-15 18:21:53 +02:00
parent 9307c4465f
commit e77e1b7810
2 changed files with 12 additions and 16 deletions

View File

@@ -23,6 +23,18 @@
#endif
uint8_t keccakState[KeccakPermutationSizeInBytes];
uint8_t outBuf[BUFLEN];
void prepareOutputBuffer() {
uint32_t i;
// Endless loop: set SW1EN and SW2EN alternately
for (i = 0u; i < BUFLEN; i+=2) {
// Alternate Ph1 and Ph2
outBuf[i] = (1 << SWEN1);
outBuf[i+1] = (1 << SWEN2);
}
}
bool initInfnoise(struct infnoise_context *context, char *serial, bool keccak, bool debug) {
context->message="";
@@ -77,18 +89,6 @@ void deinitInfnoise(struct infnoise_context *context)
ftdi_deinit(&context->ftdic);
}
uint8_t outBuf[BUFLEN];
void prepareOutputBuffer() {
uint32_t i;
// Endless loop: set SW1EN and SW2EN alternately
for (i = 0u; i < BUFLEN; i+=2) {
// Alternate Ph1 and Ph2
outBuf[i] = (1 << SWEN1);
outBuf[i+1] = (1 << SWEN2);
}
}
// Extract the INM output from the data received. Basically, either COMP1 or COMP2
// changes, not both, so alternate reading bits from them. We get 1 INM bit of output

View File

@@ -62,7 +62,6 @@ extern double inmK, inmExpectedEntropyPerBit;
#if !defined(_WIN32)
bool initializeUSB(struct ftdi_context *ftdic, const char **message,char *serial);
void prepareOutputBuffer();
struct timespec;
double diffTime(struct timespec *start, struct timespec *end);
@@ -70,7 +69,4 @@ uint32_t extractBytes(uint8_t *bytes, uint32_t length, uint8_t *inBuf, const cha
bool outputBytes(uint8_t *bytes, uint32_t length, uint32_t entropy, bool writeDevRandom, const char **message);
uint32_t processBytes(uint8_t *bytes, uint8_t *result, uint32_t *entropy, uint32_t *bytesGiven, uint32_t *bytesWritten, bool raw,
uint32_t outputMultiplier);
#endif