Add activation-codes and registration. Added tooltips. Added player-score-cache-display in mainpage.

This commit is contained in:
MaxJa4
2024-01-17 12:21:48 +01:00
parent 2a8c53ab56
commit 7e3c02e37e
18 changed files with 234 additions and 36 deletions

14
utils/misc.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
import (
"crypto/rand"
"encoding/hex"
)
func GenerateActivationCode() string {
bytes := make([]byte, 16)
if _, err := rand.Read(bytes); err != nil {
panic(err) // Handle the error appropriately in production
}
return hex.EncodeToString(bytes)
}