Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / libgo / go / crypto / rand / rand.go
blob42d9da0efb00004cfe1f2b2fca4c61f67318eaa6
1 // Copyright 2010 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.
5 // Package rand implements a cryptographically secure
6 // pseudorandom number generator.
7 package rand
9 import (
10 "io"
11 "os"
14 // Reader is a global, shared instance of a cryptographically
15 // strong pseudo-random generator.
16 // On Unix-like systems, Reader reads from /dev/urandom.
17 // On Windows systems, Reader uses the CryptGenRandom API.
18 var Reader io.Reader
20 // Read is a helper function that calls Reader.Read.
21 func Read(b []byte) (n int, err os.Error) { return Reader.Read(b) }