1
0
Fork 0
forked from External/ergo

Split passwd into its' own subpackage

This commit is contained in:
Daniel Oaks 2017-10-06 00:03:53 +10:00
parent 207c1074df
commit 68b1dc9e72
7 changed files with 37 additions and 29 deletions

View file

@ -11,6 +11,8 @@ import (
"os"
"strings"
"github.com/oragono/oragono/irc/passwd"
"github.com/tidwall/buntdb"
)
@ -36,7 +38,7 @@ func InitDB(path string) {
err = store.Update(func(tx *buntdb.Tx) error {
// set base db salt
salt, err := NewSalt()
salt, err := passwd.NewSalt()
encodedSalt := base64.StdEncoding.EncodeToString(salt)
if err != nil {
log.Fatal("Could not generate cryptographically-secure salt for the user:", err.Error())