Migrat pkg/password to using pkglib package
This commit is contained in:
parent
010fd536ea
commit
aa3580c248
11 changed files with 56 additions and 158 deletions
|
|
@ -1,8 +1,13 @@
|
|||
package config
|
||||
|
||||
import "github.com/FAU-CDI/wisski-distillery/pkg/password"
|
||||
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.Password(cfg.PasswordLength)
|
||||
return password.Generate(rand.Reader, cfg.PasswordLength, passwordx.Charset)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue