3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

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

View File

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