Explorar el Código

Use default cost for bcrypt

Nicolai Willems hace 5 años
padre
commit
076fd65dea
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)
 	}