Random generator API for Salsa20. This should be used with NoRedInk/elm-random-general to have a nice API for generating random, cryptographically secure, numbers.
Warning: if you use this module directly (which you shouldn't, use elm-random-general), it is your responsibility to make sure you don't call peel
more than once on the same State
The internal state of the generator. Contains the key, nonce and a counter.
init : Salsa20.Key -> Salsa20.Nonce -> State
Initialize the generator. This stores the key and nonce inside the state, and sets the counter to 0.
step : State -> State
Increments the counter.
peel : State -> Basics.Int
Gets an Int
out of the current state. The result will be an unsigned 32 bit integer.