Files
cloudsave/pkg/tools/id/id.go
2025-05-10 17:42:25 +02:00

16 lines
199 B
Go

package id
import (
"crypto/rand"
"encoding/hex"
)
func New() string {
bytes := make([]byte, 24)
_, err := rand.Read(bytes)
if err != nil {
panic(err)
}
return hex.EncodeToString(bytes)
}