random number generator – Node.js uuid.v4 vs crypto.randomUUID. Which implementation is more cryptographically secure?
For a long time I’ve used the uuid npm package for my v4 uuid needs. It seems in recent versions of node they have introduced a built-in crypto module with the method randomUUID.
Some benchmarks have been done to show crypto.randomUUID
is much faster than uuid.v4
(roughly 3x +).
However I can’t find any information about how the implementations differ (if at all) in terms of how they choose random numbers for their output UUID. Is one likely to be using a more secure RNG?
Read more here: Source link