rand

package
v0.0.0-...-eafbfb8 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2016 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package rand provides various utitilies related to generating cryptographically secure random numbers and byte vectors.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Reader is a replacement for crypto/rand.Reader.
	Reader = csrand.Reader
)

Functions

func New

func New() *rand.Rand

New creates a new "cryptograpically secure" math/rand.Rand.

func NewDRBG

func NewDRBG(seed []byte) *rand.Rand

NewDRBG creates a new Deterministic Random Bit Generator initialized with the provided seed and backed by SHAKE-128 that exposes a math/rand.Rand interface. As the output is entirely deterministic, this should NOT be used to generate cryptographic keying material.

Types

This section is empty.

Jump to

Keyboard shortcuts

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