mrcrypto

package
v0.9.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PassVowels      PassCharsKinds = 1
	PassConsonants                 = 2
	PassNumerals                   = 4
	PassSigns                      = 8
	PassAbc                        = 3  // PassVowels + PassConsonants
	PassAbcNumerals                = 7  // PassVowels + PassConsonants + PassNumerals
	PassAll                        = 15 // PassVowels + PassConsonants + PassNumerals + PassSigns

)

Variables

This section is empty.

Functions

func GenDigitCode

func GenDigitCode(length int) string

func GenPassword added in v0.5.7

func GenPassword(length int, charsKinds PassCharsKinds) string

func GenTokenBase64

func GenTokenBase64(length int) string

func GenTokenHex

func GenTokenHex(length int) string

func GenTokenHexWithDelimiter

func GenTokenHexWithDelimiter(length, repeat int) string

Types

type PassCharsKinds added in v0.5.7

type PassCharsKinds uint8

type PassStrength added in v0.5.7

type PassStrength uint8
const (
	PassStrengthNotRated PassStrength = iota // not rated
	PassStrengthWeak                         // weak
	PassStrengthMedium                       // middle
	PassStrengthStrong                       // strong
	PassStrengthBest                         // the best

)

func PasswordStrength added in v0.5.7

func PasswordStrength(value string) PassStrength

func (PassStrength) String added in v0.5.7

func (e PassStrength) String() string

Jump to

Keyboard shortcuts

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