random

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package random provides some functions to securely generate random bytes and numbers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(data []byte) error

Bytes fills the given byte slice with random bytes.

func Intn

func Intn(n int) (int, error)

Intn returns a random number in [0,n).

func Perm

func Perm(n int) ([]int, error)

Perm returns a random permutation of the integers [0,n).

func RandomHexString added in v1.2.3

func RandomHexString(length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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