Discover Packages
github.com/shanemhansen/gossl
crypto
rand
package
Version:
v0.0.0-...-e61308d
Opens a new window with list of versions in this module.
Published: Jul 17, 2017
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package rand implements a cryptographically secure pseudorandom number generator.
Reader is a global, cryptographically strong pseudo-random generator.
Int returns a uniform random value in [0, max). It panics if max <= 0.
Prime returns a number, p, of the given size, such that p is prime
with high probability.
Prime will return error for any error returned by rand.Read or if bits < 2.
Read is a helper function that calls Reader.Read using io.ReadFull.
On return, n == len(b) if and only if err == nil.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.