Home GnuPG

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

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

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 Nov 7 2013, 11:34 PM
epriestley <git@epriestley.com>Committed on Nov 7 2013, 11:34 PM
Parents
rPHUTILdc6e2bdf4c3c: Add "PhutilDirectedScalarGraph"
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUTIL13ad06352d84: Default to openssl_random_pseudo_bytes instead of /dev/urandom. (authored by Gabriel Guzman <gabriel.guzman@gammaemail.com>).Nov 7 2013, 11:34 PM