mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-09 15:52:54 +01:00
Winni Neessen
c0588f952a
The identifiers include the FileCopyrightText for the years 2021-2024 attributed to Winni Neessen, and the License to be under MIT. This addition brings the file into compliance with licensing standards.
23 lines
503 B
Go
23 lines
503 B
Go
// SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/wneessen/apg-go"
|
|
)
|
|
|
|
func main() {
|
|
config := apg.NewConfig(apg.WithAlgorithm(apg.AlgoRandom),
|
|
apg.WithModeMask(apg.ModeSpecial|apg.ModeNumeric|apg.ModeLowerCase|apg.ModeUpperCase),
|
|
apg.WithFixedLength(15))
|
|
generator := apg.New(config)
|
|
password, err := generator.Generate()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Println("Your password:", password)
|
|
}
|