Reading from /dev/random
Understand how to read binary data from the UNIX /dev/random device using Go. Explore handling little-endian representation and convert this data into integer seeds for random number generation in your programs.
We'll cover the following...
We'll cover the following...
In this lesson, we’ll learn how to read from the /dev/random system device. The purpose of the /dev/random system device is to generate random data, which we might use for testing our programs or, in this case, as the seed for a random number generator. Getting data from /dev/random can be a little bit tricky, and this is the main reason for specifically discussing it here. ...