浏览代码

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)
 	}