isaac64

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: Unlicense Imports: 3 Imported by: 2

README

ISAAC64 Go Module

ISAAC64 is a fast cryptographic 64-bit random number generator. The generator structure implements math/rand.Source64, but it can also be used directly without an interface.

$ go get nullprogram.com/x/isaac64

Since it's a cryptographic random number generator, it's meaningful to seed from crypto/rand.Reader:

r := isaac64.New()
r.SeedFrom(rand.Reader)

Documentation: https://godoc.org/nullprogram.com/x/isaac64

Documentation

Overview

Package isaac64 implements the ISAAC64 fast cryptographic random number generator.

Ref: https://www.burtleburtle.net/bob/rand/isaacafa.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rand

type Rand struct {
	// contains filtered or unexported fields
}

A Rand is an ISAAC64 random number generator state.

func New

func New() *Rand

New returns a new, unseeded ISAAC64 random number generator.

func (*Rand) Int63

func (r *Rand) Int63() int64

Int63 returns the next 63-bit integer from the generator.

func (*Rand) Seed

func (r *Rand) Seed(seed int64)

Seed fully initializes the generator state from a seed.

func (*Rand) SeedFrom

func (r *Rand) SeedFrom(src io.Reader) error

SeedFrom fills the internal state by reading 2,048 bytes. Typically this would be crypto/rand.Reader, but any reader that outputs bytes with reasonable statistical quality is suitable.

func (*Rand) Uint64

func (r *Rand) Uint64() uint64

Uint64 returns the next 64-bit integer from the generator.

Directories

Path Synopsis
cmd
dump command

Jump to

Keyboard shortcuts

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