Documentation ¶
Index ¶
- Constants
- func GenerateMemorablePassword(minLength int, symbols bool) string
- func GeneratePassword(length int, symbols bool) string
- func GeneratePasswordCharset(length int, chars string) string
- func GeneratePasswordCharsetCheck(length int, chars string) string
- func GeneratePasswordWithAllClasses(length int) (string, error)
Constants ¶
View Source
const ( // CharAlpha is the class of letters CharAlpha = upper + lower // CharAlphaNum is the class of alpha-numeric characters CharAlphaNum = digits + upper + lower // CharAll is the class of all characters CharAll = digits + upper + lower + syms )
Variables ¶
This section is empty.
Functions ¶
func GenerateMemorablePassword ¶
GenerateMemorablePassword will generate a memorable password with a minimum length
func GeneratePassword ¶
GeneratePassword generates a random, hard to remember password
func GeneratePasswordCharset ¶
GeneratePasswordCharset generates a random password from a given set of characters
func GeneratePasswordCharsetCheck ¶
GeneratePasswordCharsetCheck generates a random password from a given set of characters and validates the generated password with crunchy
func GeneratePasswordWithAllClasses ¶
GeneratePasswordWithAllClasses tries to enforce a password which contains all character classes instead of only enabling them. This is especially useful for broken (corporate) password policies that mandate the use of certain character classes for no good reason
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.