Merge branch 'main' of https://git.sun.museum/sam/Hyperia
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"github.com/alexedwards/argon2id"
|
||||
)
|
||||
|
||||
func isWebSocketRequest(r *http.Request) bool {
|
||||
@@ -22,6 +24,16 @@ func isWebSocketRequest(r *http.Request) bool {
|
||||
return strings.Contains(connHeader, "upgrade") && upgradeHeader == "websocket"
|
||||
}
|
||||
|
||||
func HashPassword() {
|
||||
hash, err := argon2id.CreateHash("banktest", argon2id.DefaultParams)
|
||||
if err != nil {
|
||||
log.Fatal().Msgf("failed to hash password: %v", err)
|
||||
}
|
||||
|
||||
fmt.Println("Argon2id hash: ")
|
||||
fmt.Println(hash)
|
||||
}
|
||||
|
||||
func main() {
|
||||
config.SetConfiguration()
|
||||
logger.ConfigureLogger()
|
||||
|
||||
Reference in New Issue
Block a user