3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-26 04:32:36 +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) {
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)
}