This commit is contained in:
Pavel Flegr 2026-04-08 17:53:30 +02:00
commit ef105e1cac
22 changed files with 3001 additions and 0 deletions

11
internal/auth/tokens.go Normal file
View file

@ -0,0 +1,11 @@
package auth
import (
"crypto/sha256"
"encoding/hex"
)
func HashToken(token string) string {
sum := sha256.Sum256([]byte(token))
return hex.EncodeToString(sum[:])
}