Files
xinfra/server/internal/auth/random.go
T

15 lines
192 B
Go
Raw Normal View History

2026-07-13 14:39:56 +08:00
package auth
import (
"crypto/rand"
"encoding/hex"
)
func randomID() string {
var b [16]byte
if _, err := rand.Read(b[:]); err != nil {
return ""
}
return hex.EncodeToString(b[:])
}