package
0.25.2
Repository: https://github.com/onflow/crypto.git
Documentation: pkg.go.dev

# Functions

BasicDistributionTest is a test function to run a basic statistic test on `randf` output.
computes a bijection from the set of all permutations into the the set [0, n!-1] (where `n` is the size of input `perm`).
EvaluateDistributionUniformity evaluates if the input distribution is close to uniform through a basic quick test.
NewChacha20PRG returns a new Chacha20-based PRG, seeded with the input seed (32 bytes) and a customizer (up to 12 bytes).
RestoreChacha20PRG creates a chacha20 base PRG based on a previously stored state.

# Constants

Chacha20CustomizerMaxLen is the maximum length of the nonce used as a PRG customizer, it is fixed to 24 bytes.
Chacha20SeedLen is the seed length of the Chacha based PRG, it is fixed to 32 bytes.

# Interfaces

Rand is a pseudo random number generator All methods update the internal state of the PRG which makes the PRGs implementing this interface non concurrent-safe.