This package allows cryptographically random passwords to be generated.
package main
import (
"fmt"
passwordGenerator "github.com/theTardigrade/golang-passwordGenerator"
)
func main() {
pg := passwordGenerator.New(
passwordGenerator.Options{
Len: 128,
IncludeUpperCaseLetters: true,
IncludeLowerCaseLetters: true,
IncludeDigits: true,
IncludeRunesList: []rune{
'!', '?', '-', '_', '=', '@', '$',
'#', '(', ')', '[', ']', '{', '}',
'<', '>', '+', '/', '*', '\\', '/',
':', ';', '&', '\'', '"', '%', '^',
'๐', '๐',
},
ExcludeAmbiguousRunes: true,
ExcludeRunesList: []rune{'a', 'b'},
},
)
passwords, err := pg.GenerateMany(5)
if err != nil {
panic(err)
}
for _, p := range passwords {
fmt.Println(p)
}
}
If you use this package, or find any value in it, please consider donating: