2024-03-12 20:59:07 +01:00
|
|
|
// SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2023-04-18 11:49:44 +02:00
|
|
|
package apg
|
|
|
|
|
2023-08-04 16:02:58 +02:00
|
|
|
// VERSION represents the version string
|
2024-03-25 11:31:03 +01:00
|
|
|
const VERSION = "1.2.0"
|
2023-08-04 16:02:58 +02:00
|
|
|
|
2023-04-18 11:49:44 +02:00
|
|
|
// Generator is the password generator type of the APG package
|
|
|
|
type Generator struct {
|
2023-08-04 16:02:58 +02:00
|
|
|
// config is a pointer to the apg config instance
|
|
|
|
config *Config
|
2024-03-12 18:28:01 +01:00
|
|
|
// syllables holds the single syllables of the lasst generated
|
|
|
|
// pronounceable password
|
|
|
|
syllables []string
|
2023-04-18 11:49:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// New returns a new password Generator type
|
2024-03-08 10:21:57 +01:00
|
|
|
func New(config *Config) *Generator {
|
2023-08-04 16:02:58 +02:00
|
|
|
return &Generator{
|
2024-03-08 10:21:57 +01:00
|
|
|
config: config,
|
2023-08-04 16:02:58 +02:00
|
|
|
}
|
2023-04-18 11:49:44 +02:00
|
|
|
}
|