random

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package random provides tools for generating cryptographically secure random elements. it uses golang's built in `crypto/rand` for it's RNG.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64s

func Float64s(n int) ([]float64, error)

Float64s returns a slice containing n random float64s

func Int64s

func Int64s(n int) ([]int64, error)

Int64s returns a slice containing n random int64s

func RandomBytes

func RandomBytes(n int) ([]byte, error)

RandomBytes returns a random slice of n bytes

func RandomString

func RandomString(n int) (string, error)

RandomString returns a random string comprised of n bytes

func Uint64s

func Uint64s(n int) ([]uint64, error)

Uint64s returns a slice containing n random uint64s

Types

This section is empty.

Directories

Path Synopsis
Package shuffle implements the fisher-yates shuffle to generate a random permutation of the given sequence.
Package shuffle implements the fisher-yates shuffle to generate a random permutation of the given sequence.

Jump to

Keyboard shortcuts

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