Source file src/crypto/rand/rand_getentropy.go
1 // Copyright 2016 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build openbsd || netbsd 6 7 package rand 8 9 import "internal/syscall/unix" 10 11 func init() { 12 // getentropy(2) returns a maximum of 256 bytes per call. 13 altGetRandom = batched(unix.GetEntropy, 256) 14 } 15