samedi 27 octobre 2018

Linux script using a Hardware (True) Random number generator

I'd like to use the built in hardware random number generator in my RPI3 for a project. Currently I'm only able to use /dev/hwrng to save binary dumps with

dd if=/dev/hwrng of=data.bin bs=25 count=1

What I need for my project is to generate sums of 200 bits of data chunks (with an expected mean of 100) from /dev/hwrng with a frequency of 1 reading/second and write the result into a text file with a timestamp, like this:

datetime, value 11/20/2018 12:48:09, 105 11/20/2018 12:48:10, 103 11/20/2018 12:48:11, 97

Any help is appreciated....




Aucun commentaire:

Enregistrer un commentaire