Преглед изворни кода

Use default cost for bcrypt

Nicolai Willems пре 5 година
родитељ
комит
076fd65dea
1 измењених фајлова са 1 додато и 1 уклоњено
  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)
 	}