feat: база из лабораторной 3 перенесена в лабу 4

This commit is contained in:
2026-11-10 16:24:08 +03:00
parent ec540a1a72
commit fc3ab1ca38
27 changed files with 1273 additions and 1374 deletions
+16
View File
@@ -0,0 +1,16 @@
package ident
import (
"crypto/rand"
"encoding/hex"
)
const tokenBytes = 32
func GenerateToken() string {
buf := make([]byte, tokenBytes)
if _, err := rand.Read(buf); err != nil {
panic(err)
}
return hex.EncodeToString(buf)
}