crypto

package
v2.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewToken

func NewToken(tokenLength int) string

NewToken returns a new, unique, hard-to-guess token consisting of alphanumeric characters only. The token's length is the greater of 64 or the length specified. i.e. This function produces tokens with a minimum length of 64 characters. The generated tokens incorporate a UUID (v4) to ensure uniqueness. This minimum token length of 64 was selected so that any given token consists of at least as many random, hard-to-guess characters is it does more deterministic characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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