security

package
v0.0.0-...-edeb3c3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRandom = errors.New("no randomness available")

Functions

func CreateRandomSHA256Token

func CreateRandomSHA256Token() (string, error)

func CreateRandomSHA512Token

func CreateRandomSHA512Token() (string, error)

func CreateSecretArray

func CreateSecretArray(length uint, retries int) ([]byte, error)

This tries to wait a few seconds to get a random number from the system, in case it fails bc the system is busy.

func GenRandomUIntNotPrime

func GenRandomUIntNotPrime() uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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