Parcourir la source

Use default cost for bcrypt

Nicolai Willems il y a 5 ans
Parent
commit
076fd65dea
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      cmd/hasher.go

+ 1 - 1
cmd/hasher.go

@@ -10,7 +10,7 @@ import (
 func main() {
 	password := os.Args[1]
 
-	hash, err := bcrypt.GenerateFromPassword([]byte(password), 12)
+	hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
 	if err != nil {
 		fmt.Println("Error generating hash: %s", err)
 	}