CryptRand: only use random_bytes on php 7 and HHVM
authorDerk-Jan Hartman <hartman.wiki@gmail.com>
Wed, 10 May 2017 09:47:49 +0000 (11:47 +0200)
committerDerk-Jan Hartman <hartman.wiki@gmail.com>
Fri, 26 May 2017 12:31:55 +0000 (14:31 +0200)
commit9272d7717d8b526e966928e851451a257a26b0a5
treeee7dbb3d8240056775dfd498a7baf2046ff401c6
parent3d26a9647866d79965aaf002909d0e8f9059dc68
CryptRand: only use random_bytes on php 7 and HHVM

This avoids random_bytes polyfills used on older versions of PHP or
HHVM. HHVM has had random_bytes longer than PHP so treat it separately.

Bug: T143788
Change-Id: Ic9e511ccc043d50e0a9051cdfe069c27e4f4c339
includes/libs/CryptRand.php