wisski-cloud-distillery/internal/config/password.go
Tom Wiesing 2edd0f2fe2
internal/config/template: Cleanup
This commit cleans up the internal/config/template to remove code no
longer used because of the new configuration.
2023-02-26 10:46:10 +01:00

13 lines
358 B
Go

package config
import (
"crypto/rand"
"github.com/FAU-CDI/wisski-distillery/internal/passwordx"
"github.com/tkw1536/pkglib/password"
)
// NewPassword returns a new password using the password settings from this configuration
func (cfg Config) NewPassword() (string, error) {
return password.Generate(rand.Reader, cfg.PasswordLength, passwordx.Safe)
}