Use weak but dependency-free entropy source in PhutilOpaqueEnvelope
Summary:
If PHP doesn't have access to /dev/urandom, we currently fatal here before we can get to the setup check for it.
To avoid this, use a weaker random source. This doesn't need to be a strong random source, since it's only protecting against accidental disclosure through logs, etc.
Test Plan:
- Dumped the resulting key and verified it "looked" random.
- Dumped a bunch of them to a file and gzipped it, verified it got larger.
- Had user in question apply patch and verified he got to the /dev/urandom setup check ("open_basedir configured crazy").
Reviewers: vrana, btrahan, asherkin
Reviewed By: asherkin
CC: aran
Differential Revision: https://secure.phabricator.com/D4561