| 1 |
// Copyright 2014 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 |
package rand |
| 6 |
|
| 7 |
// maxGetRandomRead is the maximum number of bytes to ask for in one call to the |
| 8 |
// getrandom() syscall. In linux at most 2^25-1 bytes will be returned per call. |
| 9 |
// From the manpage |
| 10 |
// |
| 11 |
// * When reading from the urandom source, a maximum of 33554431 bytes |
| 12 |
// is returned by a single call to getrandom() on systems where int |
| 13 |
// has a size of 32 bits. |
| 14 |
const maxGetRandomRead = (1 << 25) - 1 |