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:
parent
f0773c4e9e
commit
994200bf46
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user