use mincost to speed up bcrypt

This commit is contained in:
Jeremy Latt 2014-02-24 19:04:50 -08:00
parent f0773c4e9e
commit 994200bf46
1 changed files with 1 additions and 2 deletions

View File

@ -10,8 +10,7 @@ import (
)
func genPasswd(passwd string) {
log.Printf("encoding password \"%s\"\n", passwd)
crypted, err := bcrypt.GenerateFromPassword([]byte(passwd), bcrypt.DefaultCost)
crypted, err := bcrypt.GenerateFromPassword([]byte(passwd), bcrypt.MinCost)
if err != nil {
log.Fatal(err)
}