fastrand

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uint

func Uint() uint

func Uint32

func Uint32() uint32

func Uint32n

func Uint32n(n uint32) uint32

func Uint64

func Uint64() uint64

Types

type Fastrand

type Fastrand uint64

Fastrand is a fast random number generator based on wyrand.

func New

func New() Fastrand

New returns a new Fastrand seeded from the Go runtime's fastrand.

func (*Fastrand) Fill

func (f *Fastrand) Fill(b []byte)

Fill fills b with random bytes.

func (*Fastrand) Read

func (f *Fastrand) Read(b []byte) (int, error)

Read fills b with random bytes and returns len(b) and nil.

func (*Fastrand) Uint64

func (f *Fastrand) Uint64() uint64

Uint64 returns a random uint64.

Jump to

Keyboard shortcuts

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