summaryrefslogtreecommitdiff
path: root/nexus/utils/token
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-29 22:52:46 +0530
committerBobby <[email protected]>2026-03-29 22:52:46 +0530
commit9eb9b7f4bd552a641235764f66483e1f940fcfd9 (patch)
treeda520b923b5e6758d5457b6233dd6671fc640914 /nexus/utils/token
parent65a143a0871c35989b7c7ea6723d39a0585c089e (diff)
downloadechoes-of-vaelun-main.tar.xz
echoes-of-vaelun-main.zip
feat: nexus account manager scaffold with auth, characters, realmsHEADmain
Diffstat (limited to 'nexus/utils/token')
-rw-r--r--nexus/utils/token/token.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/nexus/utils/token/token.go b/nexus/utils/token/token.go
new file mode 100644
index 0000000..e517a15
--- /dev/null
+++ b/nexus/utils/token/token.go
@@ -0,0 +1,14 @@
+package token
+
+import (
+ "crypto/rand"
+ "encoding/hex"
+)
+
+func Generate() (string, error) {
+ bytes := make([]byte, 32)
+ if _, err := rand.Read(bytes); err != nil {
+ return "", err
+ }
+ return hex.EncodeToString(bytes), nil
+}