- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for altGetRandom (0.11 sec)
-
src/crypto/rand/rand_unix.go
type reader struct { f io.Reader mu sync.Mutex used atomic.Uint32 // Atomic: 0 - never used, 1 - used, but f == nil, 2 - used, and f != nil } // altGetRandom if non-nil specifies an OS-specific function to get // urandom-style randomness. var altGetRandom func([]byte) (err error) func warnBlocked() { println("crypto/rand: blocked for 60 seconds waiting to read random data from the kernel") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 01 08:32:46 UTC 2022 - 1.8K bytes - Viewed (0) -
src/crypto/rand/rand_getentropy.go
// license that can be found in the LICENSE file. //go:build openbsd || netbsd package rand import "internal/syscall/unix" func init() { // getentropy(2) returns a maximum of 256 bytes per call. altGetRandom = batched(unix.GetEntropy, 256)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 20:02:21 UTC 2024 - 357 bytes - Viewed (0) -
src/crypto/rand/rand_darwin.go
// regular basis, and also upon fork(2)." - arc4random(3) // // Note that despite its legacy name, it uses a secure CSPRNG (not RC4) in // all supported macOS versions. altGetRandom = func(b []byte) error { unix.ARC4Random(b); return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 20:02:21 UTC 2024 - 667 bytes - Viewed (0) -
src/crypto/rand/rand_getrandom.go
// has a size of 32 bits. maxGetRandomRead = (1 << 25) - 1 case "dragonfly", "freebsd", "illumos", "solaris": maxGetRandomRead = 1 << 8 default: panic("no maximum specified for GetRandom") } altGetRandom = batched(getRandom, maxGetRandomRead) } // If the kernel is too old to support the getrandom syscall(), // unix.GetRandom will immediately return ENOSYS and we will then fall back to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:26:43 UTC 2023 - 1.4K bytes - Viewed (0)