randutil

package
v1.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package randutil provides a shared, buffered cryptographic random token generator that amortizes crypto/rand syscalls across middleware packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexToken

func HexToken(n int) string

HexToken returns a cryptographically random hex string of n*2 characters (n random bytes, hex-encoded). Uses a stack buffer for n<=32 (the common case) to avoid the intermediate byte slice allocation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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