Skip to content
Permalink
Browse files

Add more password generation options

  • Loading branch information...
Raggaer committed Feb 25, 2019
1 parent 4311337 commit 3c1dd5fdf0c9d461f3abc06ae959c8a26b5d1164
Showing with 5 additions and 1 deletion.
  1. +5 −1 entry.go
@@ -234,7 +234,7 @@ func createNewEntry(f *form, input string) {
fmt.Print("- Entry title: ")
case 2:
data.Title = input
fmt.Print("- Entry password: ")
fmt.Print("- Entry password (use 'gen', 'gen-simple', 'gen-complex' to generate passwords): ")
case 3:
// Here we can generate password
pw, err := generateEntryPassword(input)
@@ -268,6 +268,10 @@ func generateEntryPassword(input string) (string, error) {
// Simple password generation
case "gen":
return password.Generate(22, 4, 4, false, true)
case "gen-simple":
return password.Generate(22, 4, 0, false, true)
case "gen-complex":
return password.Generate(22, 5, 6, false, false)
default:
return input, nil
}

0 comments on commit 3c1dd5f

Please sign in to comment.
You can’t perform that action at this time.