1

in nanoid introduce page, the author told that it has a better algorithm and random % alphabet is a wrong method.

https://www.npmjs.com/package/nanoid#uniformity

i don't know is it real and why. hold there is a deduction(inference ?)

and also i had read the libray test code, when verify the distribution, count of alphabet will multiplication with a constance, why?

https://github.com/ai/nanoid/blob/master/test/non-secure.test.js#L49

hope you gay can read those english from google translation :)

1
  • See thread here, though I don't really understand it either, sounds like multiplying the random number by the range of the alphabet (which any sane attempted implementation would do) would fix the distribution problem Commented Feb 28, 2020 at 6:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.