mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-10 00:02:54 +01:00
Winni Neessen
ac97b94ec9
Refactored the generator to include a new config option, changed function signatures to follow the new structure, and renamed the function 'RandomString' to 'RandomStringFromCharRange' for clarity. Also, added a new mode and algorithm feature to enhance password generation. Furthermore, added several tests for new features and configurations. Adapted the CLI to use the new configuration approach. This refactoring was necessary to improve the customizability and clarity of the password generation process. Fixed minor issues and added '.gitignore' for clean commits in the future.
19 lines
423 B
Go
19 lines
423 B
Go
package apg
|
|
|
|
// VERSION represents the version string
|
|
const VERSION = "2.0.0"
|
|
|
|
// Generator is the password generator type of the APG package
|
|
type Generator struct {
|
|
// charRange is the range of character used for the
|
|
charRange string
|
|
// config is a pointer to the apg config instance
|
|
config *Config
|
|
}
|
|
|
|
// New returns a new password Generator type
|
|
func New(c *Config) *Generator {
|
|
return &Generator{
|
|
config: c,
|
|
}
|
|
}
|