X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=library%2Fdefuse%2Fphp-encryption-1.2.1%2FCrypto.php;h=5b60f6f121ce12c19a842a84f6428ee30176ba0d;hb=d9451ef969c2242b85401982669b7721483d107b;hp=60b5a62cc126991beef986b0812d8a3f0f0e0c90;hpb=1a1c2d74f67f175e33a281aee9cd6fc522ffd384;p=friendica.git diff --git a/library/defuse/php-encryption-1.2.1/Crypto.php b/library/defuse/php-encryption-1.2.1/Crypto.php index 60b5a62cc1..5b60f6f121 100644 --- a/library/defuse/php-encryption-1.2.1/Crypto.php +++ b/library/defuse/php-encryption-1.2.1/Crypto.php @@ -342,9 +342,9 @@ final class Crypto */ private static function SecureRandom($octets) { - self::EnsureFunctionExists("mcrypt_create_iv"); - $random = mcrypt_create_iv($octets, MCRYPT_DEV_URANDOM); - if ($random === FALSE) { + self::EnsureFunctionExists("openssl_random_pseudo_bytes"); + $random = openssl_random_pseudo_bytes($octets, $crypto_strong); + if ($crypto_strong === FALSE) { throw new CannotPerformOperationException(); } else { return $random;