This commit cleans up the internal/config/template to remove code no longer used because of the new configuration.
13 lines
358 B
Go
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)
|
|
}
|