rng

package
v0.0.0-...-50c319b Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rng

type Rng struct {
	// contains filtered or unexported fields
}

Rng implements a simple determinisic random number generator. Starting from an initial entropy, nonce, and personalizationString, it utilizes HMAC_DRBG construct as per NIST Special Publication 800-90A to produce a stream of random uint64 integers.

func NewRng

func NewRng(seed, nonce, personalizationString []byte) (*Rng, error)

NewRng creates a new psudo-random generator, using the given seeds as the initial random source.

func (*Rng) RandUint64

func (r *Rng) RandUint64() uint64

RandUint64 returns the next 64-bit unsigned random integer produced by this generator.

Jump to

Keyboard shortcuts

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