summaryrefslogtreecommitdiff
path: root/token.go
diff options
context:
space:
mode:
Diffstat (limited to 'token.go')
-rw-r--r--token.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/token.go b/token.go
new file mode 100644
index 0000000..bdabcc4
--- /dev/null
+++ b/token.go
@@ -0,0 +1,19 @@
+package main
+
+import (
+ "crypto/rand"
+)
+
+type Token struct {
+ data []byte
+}
+
+func NewToken() Token {
+ t := Token{}
+
+ t.data = make([]byte, 32)
+
+ _, _ = rand.Read(t.data)
+
+ return t
+}