crypto

package
v0.0.0-...-1974178 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0, BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Randomness = rand.New(RandomnessSource{})

Randomness contains an Rand instance of the previously defined RandomnessSource.

Functions

This section is empty.

Types

type RandomnessSource

type RandomnessSource struct{}

RandomnessSource implements a cryptographically secure randomness source.

func (RandomnessSource) Int63

func (s RandomnessSource) Int63() int64

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

func (RandomnessSource) Seed

func (s RandomnessSource) Seed(int64)

Seed is usually used to initialize the generator to a deterministic state but we want real randomness.

func (RandomnessSource) Uint64

func (s RandomnessSource) Uint64() (v uint64)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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