Add password hashing with argon2
This commit is contained in:
parent
01da46b81e
commit
1dd0332bc1
11 changed files with 107 additions and 15 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
type Store struct {
|
||||
db *sql.DB
|
||||
cakes []models.Cake
|
||||
users map[string]models.User
|
||||
}
|
||||
|
||||
func OpenStore(filename string) *Store {
|
||||
|
|
@ -27,6 +28,10 @@ func OpenStore(filename string) *Store {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
out.users, err = out.loadUsers()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return &out
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue