random

package
v0.0.0-...-e2efd09 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RandGenerator

type RandGenerator struct {
	rand.Source
}

RandGenerator is a structure that generates pseudo-random values from a `rand.Source`.

func NewRandomGenerator

func NewRandomGenerator(seed int64) *RandGenerator

NewRandomGenerator returns a new `*RandGenerator`.

func (*RandGenerator) GenerateBytes

func (rg *RandGenerator) GenerateBytes(len int) []byte

GenerateBytes returns a random `[]byte` of size `len`.

NOTE: it's obvious but do not use for cryptography purposes.

Jump to

Keyboard shortcuts

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