Files
InfantrySkillCalculator/utils/misc.go

15 lines
269 B
Go

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)
}