HomePhabricator

Default to openssl_random_pseudo_bytes instead of /dev/urandom.
13ad06352d84Unpublished

Unpublished Commit · Learn More

No further details are available.

Description

Default to openssl_random_pseudo_bytes instead of /dev/urandom.

Summary: When available, prefer php's built in openssl_random_pseudo_bytes() to /dev/urandom. Test for functionality and fallback to /dev/urandom if necessary to get data. Simplifies the code a bit, and is somewhat more functional as running inside a chroot is now possible.

Test Plan: Add unit test for readRandomBytes() Would be nice to have someone test this on windows. Working on ubuntu at the moment.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D7528

Details

Provenance
Gabriel Guzman <gabriel.guzman@gammaemail.com>Authored on
epriestleyCommitted on Nov 7 2013, 10:34 PM
Reviewer
epriestley
Differential Revision
D7528: Default to openssl_random_pseudo_bytes instead of /dev/urandom.
Parents
rPHUdc6e2bdf4c3c: Add "PhutilDirectedScalarGraph"
Branches
Unknown
Tags
Unknown

Event Timeline