Hi @jedisct1! What is the idea of randombytes_uniform returning 0 when upper_limit < 2, instead of causing some sort of error? Was a bit surprised, so do you want a PR for documentation? Relevant lineshttps://github.com/jedisct1/libsodium/blob/master/src/libsodium/randombytes/randombytes.c#L136-L138 …
This is consistent with the C function arc4random_uniform(3) https://man.openbsd.org/arc4random.9
-
-
Ah ok, so there's a precedent to be followed
-
But a PR to clarify this in the documentation wouldn’t be a bad thing :)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.