This commit is contained in:
metacryst
2025-10-30 13:19:43 -05:00

View File

@@ -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()