utils

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginCodeGamma

func LoginCodeGamma(extraHardened bool) string

LoginCodeGamma returns the character set (gamma) used for verification/ login codes. extraHardened should be false in normal operation; it is only set to true when rate limiting is explicitly disabled (again, not recommended for production). In that hardened mode it returns a much larger alphabet to drastically increase entropy; combined with the hardened length, this makes brute-force attacks negligible even without rate limiting.

func LoginCodeLength

func LoginCodeLength(extraHardened bool) int

LoginCodeLength returns the length of verification/login codes. extraHardened should be false in normal operation; it is only set to true when rate limiting is explicitly disabled (which should never happen in production). In that hardened mode it returns a longer length to significantly increase the search space; together with the hardened gamma this yields an astronomically large space.

Types

This section is empty.

Jump to

Keyboard shortcuts

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