]> diplodocus.org Git - nmh/commitdiff
rand()/srand() are not cryptographically secure PRNGs. Some systems
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Sat, 14 Dec 2013 00:57:57 +0000 (18:57 -0600)
committerDavid Levine <levinedl@acm.org>
Sat, 14 Dec 2013 00:57:57 +0000 (18:57 -0600)
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.


No differences found