MCPcopy Create free account
hub / github.com/supabase/auth / secureRandomInt

Function secureRandomInt

internal/crypto/crypto.go:50–53  ·  view source on GitHub ↗

Generated a random secure integer from [0, max[

(max int)

Source from the content-addressed store, hash-verified

48
49// Generated a random secure integer from [0, max[
50func secureRandomInt(max int) int {
51 randomInt := must(rand.Int(rand.Reader, big.NewInt(int64(max))))
52 return int(randomInt.Int64())
53}
54
55type EncryptedString struct {
56 KeyID string `json:"key_id"`

Callers 1

GeneratePasswordFunction · 0.85

Calls 1

mustFunction · 0.85

Tested by

no test coverage detected