mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-22 13:50:49 +01:00
27 lines
500 B
Go
27 lines
500 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/wneessen/apg-go/chars"
|
|
"github.com/wneessen/apg-go/config"
|
|
"github.com/wneessen/apg-go/random"
|
|
)
|
|
|
|
func main() {
|
|
c := config.Config{
|
|
UseNumber: true,
|
|
UseSpecial: true,
|
|
UseUpperCase: true,
|
|
UseLowerCase: true,
|
|
PwAlgo: 1,
|
|
MinPassLen: 15,
|
|
MaxPassLen: 15,
|
|
}
|
|
pl := config.GetPwLengthFromParams(&c)
|
|
cs := chars.GetRange(&c)
|
|
pw, err := random.GetChar(&cs, pl)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Println("Your Password:", pw)
|
|
}
|