security

package
v0.0.0-...-0227cab Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPasswordLen = 64
)

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(size int) (string, error)

GeneratePassword return a password with at least one digit char and special char

func MustRandInt

func MustRandInt(max int) int

MustRandInt

func PasswordValidate

func PasswordValidate(pwd string, minLen, maxLen int) error

PasswordValidate verify password strength

func RandInt

func RandInt(max int) (int, error)

RandInt generate random number in range [0, max)

Types

This section is empty.

Jump to

Keyboard shortcuts

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