rand: github.com/chanxuehong/rand Index | Files

package rand

import "github.com/chanxuehong/rand"


Package Files

int.go rand.go read.go

func Int31 Uses

func Int31() int32

Int31 returns a non-negative random 31-bit integer as an int32.

func Int63 Uses

func Int63() int64

Int63 returns a non-negative random 63-bit integer as an int64.

func New Uses

func New() (rd [16]byte)

New returns 16-byte raw random bytes. It is not printable, you can use encoding/hex or encoding/base64 to print it.

func NewHex Uses

func NewHex() (rd []byte)

NewHex returns 32-byte hex-encoded bytes.

func Read Uses

func Read(p []byte)

Read reads len(p)-byte raw random bytes to p.

func Uint32 Uses

func Uint32() uint32

Uint32 returns a random 32-bit integer as a uint32.

func Uint64 Uses

func Uint64() uint64

Uint64 returns a random 64-bit integer as a uint64.

Package rand imports 8 packages (graph) and is imported by 7 packages. Updated 2018-09-24. Refresh now. Tools for package owners.