MCPcopy Index your code
hub / github.com/coder/coder / Int63

Method Int63

cryptorand/numbers.go:17–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17func (c *cryptoSource) Int63() int64 {
18 var n int64
19 err := binary.Read(rand.Reader, binary.BigEndian, &n)
20 if err != nil {
21 c.err = err
22 }
23 // The sign bit must be cleared to ensure the final value is non-negative.
24 n &= 0x7fffffffffffffff
25 return n
26}
27
28func (c *cryptoSource) Uint64() uint64 {
29 var n uint64

Callers 2

Int63Function · 0.45
GenerateDeterministicKeyFunction · 0.45

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected