browserify / randombytes

random bytes from browserify stand alone
MIT License
99 stars 47 forks source link

requested too many random bytes #14

Closed achingbrain closed 5 years ago

achingbrain commented 6 years ago

It looks like this library limits the number of random bytes you can request to 65536. Node limits it to the max value of an unsigned 32 bit integer.

Is there any reason for the discrepancy?

calvinmetcalf commented 6 years ago

yes that's the limit of getRandomValues, the browser api we use

achingbrain commented 6 years ago

I see - why not request multiples of 65536 and join the buffers together?

dcousens commented 6 years ago

@achingbrain PR accepted I suppose

robyoder commented 5 years ago

This should have been closed by #16 I believe.