generators

package
v0.9.14 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Generate([]byte) ([]byte, error)
	Size() int
}

func NewDeterministicBytesGenerator

func NewDeterministicBytesGenerator(size int) (Generator, error)

NewDeterministicBytesGenerator returns a hash based generator that is safe for concurrent use. All instances hash with the same (empty) salt, so the output only depends on the input.

func NewRandomBytesGenerator

func NewRandomBytesGenerator(size int) Generator

NewRandomBytesGenerator returns a random bytes generator that is safe for concurrent use.

Jump to

Keyboard shortcuts

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