Port random_bytes to PHP 5
| From: | Tom Worster | Date: | Tue, 13 Oct 2015 00:29:45 +0000 |
| Subject: | Port random_bytes to PHP 5 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-88759@lists.php.net to get a copy of this message | ||
Could we regard random_bytes() as a security patch rather than a new
feature and therefore port it to PHP 5?
Error handling would have to change but that should be feasible. Iirc,
earlier commits of random_bytes() had PHP 5-like behavior on error.
My motivation: it's easier to defend abandoning OpenSSL's RNG (e.g. in
paragonie/random_compat) if we could say to Windows users stuck with
nothing else: "Upgrade to the latest point release of PHP 5.x. It has a
proper fix."
Tom