56 lines
1.3 KiB
Go
56 lines
1.3 KiB
Go
|
package pwgenerator
|
||
|
|
||
|
// Upper returns the set of uppercase letters.
|
||
|
func Upper() CharSet {
|
||
|
return upper
|
||
|
}
|
||
|
|
||
|
// Lower returns the set of lowercase letters.
|
||
|
func Lower() CharSet {
|
||
|
return upper
|
||
|
}
|
||
|
|
||
|
// Alpha returns the set of all letters (upper/lowercase).
|
||
|
func Alpha() CharSet {
|
||
|
return alpha
|
||
|
}
|
||
|
|
||
|
// Numeric returns the set of all numbers.
|
||
|
func Numeric() CharSet {
|
||
|
return numeric
|
||
|
}
|
||
|
|
||
|
// AlphaNumeric returns the set of all letters and numbers.
|
||
|
func AlphaNumeric() CharSet {
|
||
|
return alphaNumeric
|
||
|
}
|
||
|
|
||
|
// Symbols returns the set of all "simple" symbols.
|
||
|
func Symbols() CharSet {
|
||
|
return symbols
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
ExtendedSymbols returns the set of the "extended" symbols.
|
||
|
|
||
|
Don't be fooled; these are still ASCII but are unlikely to be supported in an application consuming passwords.
|
||
|
|
||
|
If it does, however, adding just one to your password GREATLY increases the protection it has against bruteforce/dictionary attacks.
|
||
|
*/
|
||
|
func ExtendedSymbols() CharSet {
|
||
|
return extendedSymbols
|
||
|
}
|
||
|
|
||
|
// AllSymbols returns both simple and extended symbols.
|
||
|
func AllSymbols() CharSet {
|
||
|
return allSymbols
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
SafeAscii returns alphanumeric and simple symbol charset; these have
|
||
|
the highest yield of good character space while ensuring that MOST applications will accept them as input.
|
||
|
*/
|
||
|
func SafeAscii() CharSet {
|
||
|
return safeAscii
|
||
|
}
|