RNG.stir((uint8_t )analog1, sizeof(analog1), sizeof(analog1) 4);
touchread1 = touchRead(TOUCHPIN1);
RNG.stir((uint8_t )touchread1, sizeof(touchread1), sizeof(touchread1));
delay((analog1 % 3) + ((touchread1 + touchread2 + touchread3) % 3)); //delay 0 - 6 ms integrityctr1++;
touchread2 = touchRead(TOUCHPIN2); RNG.stir((uint8_t )touchread2, sizeof(touchread2), sizeof(touchread2));
touchread3 = touchRead(TOUCHPIN3);
RNG.stir((uint8_t )touchread3, sizeof(touchread3), sizeof(touchread3));
touchread4 = touchRead(TOUCHPIN4);
RNG.stir((uint8_t )touchread4, sizeof(touchread4), sizeof(touchread4));
touchread5 = touchRead(TOUCHPIN5);
RNG.stir((uint8_t )touchread5, sizeof(touchread5), sizeof(touchread5)); touchread6 = touchRead(TOUCHPIN6);
RNG.stir((uint8_t )touchread6, sizeof(touchread6), sizeof(touchread6));
unsigned int analog2 = analogRead(ANALOGPIN2);
RNG.stir((uint8_t )analog2, sizeof(analog2), sizeof(analog2) 4);
// Perform regular housekeeping on the random number generator.
RNG.loop();
delay((analog2 % 3) + ((touchread6 + touchread5 + touchread4) % 3)); //delay 0 - 6 ms
integrityctr2++;
if (integrityctr1 != integrityctr2) { //Integrity Check unlocked = false; CPU_RESTART(); return; }
https://github.com/trustcrypto/libraries/blob/5bd1f8eb15eb04...