Przeglądaj źródła

Use default cost for bcrypt

Nicolai Willems 5 lat temu
rodzic
commit
076fd65dea
1 zmienionych plików z 1 dodań i 1 usunięć
  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)
 	}