Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HwRandomCurrentFile shows/sets the current // HW random number generator HwRandomCurrentFile = "/sys/class/misc/hw_random/rng_current" // HwRandomAvailableFile shows the current available // HW random number generator HwRandomAvailableFile = "/sys/class/misc/hw_random/rng_available" // RandomEntropyAvailableFile shows how much of the entropy poolsize is used RandomEntropyAvailableFile = "/proc/sys/kernel/random/entropy_avail" // EntropyFeedTime sets the loop time for seeding /dev/random by /dev/hwrng // in seconds EntropyFeedTime = 2 * time.Second // EntropyBlockSize sets the bytes to read per Read function call EntropyBlockSize = 128 // EntropyThreshold is used to stop seeding at specific entropy level EntropyThreshold uint64 = 3000 // RandomDevice is the linux random device RandomDevice = "/dev/random" // HwRandomDevice is the linux hw random device HwRandomDevice = "/dev/hwrng" )
Functions ¶
func UpdateLinuxRandomness ¶
UpdateLinuxRandomness seeds random data from /dev/hwrng into /dev/random based on a timer and the entropy pool size
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.