1
$\begingroup$

I went through this post SHA256 output to 1-6 number range?, this post, SHA256 output to 0-99 number range? and I felt like the exact way mentioned in the first one is really helpful. I am looking for help to generalize the way for any arbitrary integer, in other words, if we want the output values in range of 0 to n where any output may get any value in the range with equal probability, how would I apply the exact way mentioned in the first post? Or is there any other way which helps?

$\endgroup$
3

0

Browse other questions tagged or ask your own question.