From: Pascal Stumpf Date: Sat, 14 Dec 2013 00:57:57 +0000 (-0600) Subject: rand()/srand() are not cryptographically secure PRNGs. Some systems X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3800e2f1d7cbd085f8faf8df6141f92e8ee0617e?hp=3800e2f1d7cbd085f8faf8df6141f92e8ee0617e rand()/srand() are not cryptographically secure PRNGs. Some systems have the much better suited arc4random() family of functions; there's no reason to not use it if it is available. Make m_rand() just a wrapper around arc4random_buf() in that case. (There's no need to ever seed it manually.) As a bonus, silences some warnings on OpenBSD. ---