initital commit

This commit is contained in:
2026-05-05 08:44:55 +00:00
commit a1922f5be1
22 changed files with 2922 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package handlers
import (
"crypto/rand"
"fmt"
"strings"
)
// GenerateKey produces a license key in the format XXXX-XXXX-XXXX-XXXX
func GenerateKey() string {
b := make([]byte, 8)
rand.Read(b)
hex := fmt.Sprintf("%X", b)
parts := []string{
hex[0:4], hex[4:8], hex[8:12], hex[12:16],
}
return strings.Join(parts, "-")
}