Documentation ¶
Index ¶
- Constants
- func GenDigitCode(length int) string
- func GenPassword(length int, charsKinds PassCharsKinds) string
- func GenToken(length int) []byte
- func GenTokenBase64(length int) string
- func GenTokenHex(length int) string
- func GenTokenHexWithDelimiter(length, repeat int) string
- type PassCharsKinds
- type PassStrength
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 GenPassword ¶ added in v0.5.7
func GenPassword(length int, charsKinds PassCharsKinds) string
func GenTokenBase64 ¶
func GenTokenHex ¶
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
Click to show internal directories.
Click to hide internal directories.