keygen

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package keygen provides functionality for generating API client IDs and secrets.

Index

Constants

View Source
const (
	KeyIDLength  = 32
	SecretLength = 64
)

Defaults for the length of key IDs and secrets in Quarterdeck.

Variables

This section is empty.

Functions

func Alpha

func Alpha(n int) string

Alpha generates a random string of n characters that only includes upper and lowercase letters (no symbols or digits).

func AlphaNumeric

func AlphaNumeric(n int) string

AlphaNumeric generates a random string of n characters that includes upper and lowercase letters and the digits 0-9.

func CryptoRandInt

func CryptoRandInt() uint64

func KeyID

func KeyID() string

KeyID returns a random ID that is of a fixed length with only alpha characters.

func Secret

func Secret() string

Secret returns a random string of a fixed length with alpha-numeric characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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