News for hackers. Stuff that matters.
Re:You'll regret using natural keys by inopinatus on Wednesday June 05, 2024 @08:28AM (#40584043)
Having a zero in your alphabet can be problematic, because leading zeros are often stripped (e.g. Excel notoriously mangles phone numbers thinking they are integers).

Multiple calls to a randomness generator can be expensive, and a waste of entropy; production-scale random string generators should still respect this and ask for a block of bytes, then encode them, but with bias correction. You're off the hook in this case, I think node's implementation of randomInt is doing exactly that for you and conserving remaining entropy in a cache.

There are no comments on this comment yet.