random

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Sha256 = func(bytes, output []byte, offset int) {
	ob := sha.Sha256(bytes)
	copy(output[:], ob[offset:])
}

Functions

func Min

func Min(x, y int) int

func RandString

func RandString(n int) string

Types

type HashFunc

type HashFunc = func(bytes []byte, output []byte, offset int)

type HashSecureRandom

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

func NewHashSecureRandom

func NewHashSecureRandom(seed []byte, hashSize int, hf HashFunc) *HashSecureRandom

func (*HashSecureRandom) Read

func (sr *HashSecureRandom) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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