Per Waldemar and others, it's not a good idea to treat the produced value as being the next state/seed; in crypto-secure generators, in particular, the state might be a completely different structure.
Suggestion, per @domenic, is to expose a .seed() on the generator that returns the seed.
Luckily, this resolves the issue in the README about what the output space is; we can go ahead and match Math.random() and just output a value in [0,1].
@erights emphasizes that it should be possible to hide the seed-exposing functionality from down-level code. Is it okay to just require that you launder this thru a separate generator? That is:
Per Waldemar and others, it's not a good idea to treat the produced value as being the next state/seed; in crypto-secure generators, in particular, the state might be a completely different structure.
Suggestion, per @domenic, is to expose a
.seed()
on the generator that returns the seed.Luckily, this resolves the issue in the README about what the output space is; we can go ahead and match
Math.random()
and just output a value in [0,1].@erights emphasizes that it should be possible to hide the seed-exposing functionality from down-level code. Is it okay to just require that you launder this thru a separate generator? That is:
Is this okay?