apg-go/apg.go
Winni Neessen acadccc84a
Add binary mode for secret generation
This commit updates the password generator to now include a binary mode. This mode produces a 256 bits long fully binary secret which can be used for AES-256 encryption. New flags `-bh` (print hex representation) and `-bn` (new line after secret) have been added for this mode. The version has also been updated to 1.0.1 recognizing this new addition.
2024-03-17 18:09:27 +01:00

24 lines
577 B
Go

// SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
//
// SPDX-License-Identifier: MIT
package apg
// VERSION represents the version string
const VERSION = "1.0.1"
// Generator is the password generator type of the APG package
type Generator struct {
// config is a pointer to the apg config instance
config *Config
// syllables holds the single syllables of the lasst generated
// pronounceable password
syllables []string
}
// New returns a new password Generator type
func New(config *Config) *Generator {
return &Generator{
config: config,
}
}