mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
18 lines
365 B
Go
18 lines
365 B
Go
package rnd
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// UUID returns a random string based on RFC 4122 (UUID Version 4) or panics.
|
|
//
|
|
// The strength of the UUID depends on the "crypto/rand" package.
|
|
func UUID() string {
|
|
return uuid.NewString()
|
|
}
|
|
|
|
// State is an alias for UUID for use in the context of OpenID Connect (OIDC).
|
|
func State() string {
|
|
return UUID()
|
|
}
|