Files
orbits/internal/shared/security/generator.go
T
2026-04-29 23:38:43 +02:00

20 lines
286 B
Go

package security
import (
"crypto/rand"
"encoding/base64"
"github.com/google/uuid"
)
func GenerateSafeName() string {
return uuid.New().String()
}
func GenerateChars(byteLen int) string {
b := make([]byte, byteLen)
rand.Read(b)
return base64.StdEncoding.EncodeToString(b)
}