Skip to content

Commit

Permalink
Increases the length of the password generated
Browse files Browse the repository at this point in the history
  • Loading branch information
saltiyazan committed Jul 8, 2024
1 parent d6b1d7b commit 3c4be56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ func getRandomChars(charset string, length int) (string, error) {
return string(result), nil
}

// Generates a random 8 chars long password that contains uppercase and lowercase characters and numbers or symbols.
// Generates a random 16 chars long password that contains uppercase and lowercase characters and numbers or symbols.
var GeneratePassword = func() (string, error) {
const (
uppercaseSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Expand All @@ -449,7 +449,7 @@ var GeneratePassword = func() (string, error) {
if err != nil {
return "", err
}
allChars, err := getRandomChars(allCharsSet, 2)
allChars, err := getRandomChars(allCharsSet, 10)
if err != nil {
return "", err
}
Expand Down

0 comments on commit 3c4be56

Please sign in to comment.