rand

package
v0.0.0-...-0fc1b25 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const HydraStateBytes = 48

Variables

This section is empty.

Functions

func Bytes

func Bytes(n int) ([]byte, error)

Bytes will help us generate a random bytes, or will return an error if there was one. This uses the crypto/rand package so it is safe to use with things like hydra state.

func GenerateHydraState

func GenerateHydraState() (string, error)

GenerateHydraState is a helper function designed to generate hydra state of a predetermined byte size.

func String

func String(nBytes int) (string, error)

String will generate a byte slice of size nBytes and then return a string that is the base64 URL encoded version of that byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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