Hacker News new | ask | show | jobs
by jagged-chisel 1110 days ago
How does the quality of random_bytes() compare?
2 comments

The manual says it uses high-quality sources

https://www.php.net/manual/en/function.random-bytes.php

Edit: the PHP docs seem to meet the requirements from the article but, the article has a different recommendation (odd?, Maybe I missed something)

It uses the OS's cryptographic RNG.