4 ms·
I believe the criticism here is about index.js, which is what all the other claims are about. var bytes = random(size) for (var i = 0; i < size; i++) {
by daveFNbuck 9y ago
I believe the criticism here is about index.js, which is what all the other claims are about.
var bytes = random(size)
for (var i = 0; i < size; i++) {
id += url[bytes[i] & 63]
}
This part of the code just uses an alphabet size of 64, which makes the approach actually used in the exported function identical to modding the byte by the alphabet size.
- dchest 9y agoYes, with a power-of-two alphabet length there's no bias. The poster seems to be confused about modulo bias claims, which apply to non-power-of-two alphabets, not a particular way of calculating modulus.