3 ms·
Cryptography is rare, but generating other data that needs to be unpredictable (e.g. session IDs, password reset tokens, random passwords getting generated, gif
by tgsovlerkhgsel 6y ago
Cryptography is rare, but generating other data that needs to be unpredictable (e.g. session IDs, password reset tokens, random passwords getting generated, gift card codes, real-money gambling numbers) is quite common, I think.
And the default implementation of random() doesn't seem to be any faster than AES-CTR (which is the core of one form of secure PRNG).