mirror of
https://github.com/pushbits/server.git
synced 2025-06-03 19:22:05 +02:00
Replace bcrypt with Argon2
This commit is contained in:
parent
0b871b2136
commit
d8b62f1b80
5 changed files with 25 additions and 11 deletions
|
@ -41,7 +41,7 @@ func NewUser(name, password string, isAdmin bool, matrixID string) *User {
|
|||
|
||||
user := User{
|
||||
Name: name,
|
||||
PasswordHash: credentials.CreatePassword(password),
|
||||
PasswordHash: credentials.CreatePasswordHash(password),
|
||||
IsAdmin: isAdmin,
|
||||
MatrixID: matrixID,
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func NewUser(name, password string, isAdmin bool, matrixID string) *User {
|
|||
func (u *ExternalUserWithCredentials) IntoInternalUser() *User {
|
||||
return &User{
|
||||
Name: u.Name,
|
||||
PasswordHash: credentials.CreatePassword(u.Password),
|
||||
PasswordHash: credentials.CreatePasswordHash(u.Password),
|
||||
IsAdmin: u.IsAdmin,
|
||||
MatrixID: u.MatrixID,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue