entropy

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandom

func GetRandom(source EntropySource, len uint32) ([]byte, error)

GetRandom reads len bytes of randomness from whatever Reader is passed in, and returns those bytes as the requested randomness.

Types

type EntropySource

type EntropySource interface {
	Read(data []byte) (n int, err error)
}

CustomRandomSource is a generic interface that any drand node operator can implement to provide their own source of randomness in function GetRandom.

Jump to

Keyboard shortcuts

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