add password generator
This commit is contained in:
13
generator/passphrase.go
Normal file
13
generator/passphrase.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package generator
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/sethvargo/go-diceware/diceware"
|
||||
)
|
||||
|
||||
func GeneratePassphrase(words int) string {
|
||||
list, _ := diceware.Generate(words)
|
||||
|
||||
return strings.Join(list, " ")
|
||||
}
|
||||
Reference in New Issue
Block a user