This commit is contained in:
Rinaldo
2026-09-28 12:02:44 +07:00
parent 36ce460f3b
commit 64e1875525
20 changed files with 870 additions and 61 deletions
+14
View File
@@ -0,0 +1,14 @@
package auth
import (
"crypto/rand"
"encoding/hex"
)
func GenerateToken() (string, error) {
b := make([]byte, 32)
if _, err := rand.Read(b); err != nil {
return "", err
}
return hex.EncodeToString(b), nil
}