mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-09 17:38:04 +02:00
Refactor server code (#407)
This commit is contained in:
11
internal/auth/password/password.go
Normal file
11
internal/auth/password/password.go
Normal file
@ -0,0 +1,11 @@
|
||||
package password
|
||||
|
||||
import "github.com/thomiceli/opengist/internal/auth"
|
||||
|
||||
func HashPassword(code string) (string, error) {
|
||||
return auth.Argon2id.Hash(code)
|
||||
}
|
||||
|
||||
func VerifyPassword(code, hashedCode string) (bool, error) {
|
||||
return auth.Argon2id.Verify(code, hashedCode)
|
||||
}
|
Reference in New Issue
Block a user