Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a Source that can generate uniformly-distributed pseudo-random uint64 values.
The first secret will be the Argon2 salt. Common use cases:
reddit.com my master password example.com my master password
here the site's name serves as the salt, which appropriately fits the role of the salt (a non-secret value). Argon2 is configured to output 32+16 bytes: 32 bytes for the key, 16 bytes for the IV. In this case (deterministic CSPRNG) the IV isn't important and it could simply be zero.
Types ¶
type SecureSource ¶
SecureSource contains a `cipher.Stream`.
func (*SecureSource) Int63 ¶
func (s *SecureSource) Int63() int64
Int63 generates a (pseudo-)random 63bit value.
func (*SecureSource) Uint64 ¶
func (s *SecureSource) Uint64() uint64
Uint64 generates a (pseudo-)random 64bit value. Uses XORKeyStream with a zero input to extract the raw keystream as 64-bit integers.