secrets

package
v0.0.0-...-04ccfb0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"

Alphabet is an alphabet for secret. Secret is not intended to be manually entered by human.

Variables

This section is empty.

Functions

func GenerateOctetKey

func GenerateOctetKey(createdAt time.Time, rng *mathrand.Rand) jwk.Key

func GenerateOctetKeyForSig

func GenerateOctetKeyForSig(createdAt time.Time, rng *mathrand.Rand) jwk.Key

func GenerateRSAKey

func GenerateRSAKey(createdAt time.Time, rng *mathrand.Rand) jwk.Key

func GenerateSecret

func GenerateSecret(length int, rng *mathrand.Rand) string

func ShannonEntropy

func ShannonEntropy(s string) (bits int)

ShannonEntropy is borrowed from https://github.com/Xe/x/blob/v1.2.3/entropy/shannon.go.

Types

This section is empty.

Jump to

Keyboard shortcuts

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