Help us shape the future of Go! Take the 2026 Go Developer Survey

random

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package random generates unguessable tokens for session IDs, login state and nonces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Token

func Token(byteCount int) (string, error)

Token returns byteCount crypto/rand bytes, base64url without padding. byteCount must be positive. It is safe for concurrent use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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