tugas baru

This commit is contained in:
Nama Kamu
2026-09-28 12:15:29 +07:00
parent 8bafff0c98
commit 6e7e35d9a5
15 changed files with 834 additions and 33 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
}