rng

package
v6.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2019 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func UpdateLinuxRandomness(recoverer recovery.Recoverer) error

UpdateLinuxRandomness seeds random data from /dev/hwrng into /dev/random based on a timer and the entropy pool size

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL