Documentation
¶
Overview ¶
Package nonce implements a simple ASCII nonce generator, as well as some randomization utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCryptoRandSource ¶
NewCryptoRandSource returns a rand.Source64 backed by the cryptographically-secure random number generator in crypto/rand. If crypto/rand is unavailable, NewCryptoRandSource panics.
The returned rand.Source64 does not support seeding, and the Seed method is a no-op.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator creates randomly generated ASCII nonces. The set of possible characters in generated nonces is the same as RandomBase64. A Generator instance is safe for concurrent use.
func NewGenerator ¶
NewGenerator creates a new Generator from the given rand.Source.
Click to show internal directories.
Click to hide internal directories.