Project

General

Profile

Bug #24410 » test_mcrypt_randoms.php

Tomasz Krawczyk, 2011-08-24 11:35

 
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
echo date("G:i:s") . "<br />";


if( defined('MCRYPT_RAND') )
echo "MCRYPT_RAND is defined<br />";
else
echo "MCRYPT_RAND is not defined<br />";

if( defined('MCRYPT_DEV_RANDOM') )
echo "MCRYPT_DEV_RANDOM is defined<br />";
else
echo "MCRYPT_DEV_RANDOM is not defined<br />";

if( defined('MCRYPT_DEV_URANDOM') )
echo "MCRYPT_DEV_URANDOM is defined<br />";
else
echo "MCRYPT_DEV_URANDOM is not defined<br />";

echo 'MCRYPT_RAND - ' . mcrypt_create_iv(10, MCRYPT_RAND) . '<br />';
echo 'MCRYPT_DEV_RANDOM - ' . mcrypt_create_iv(10, MCRYPT_DEV_RANDOM) . '<br />';
echo 'MCRYPT_DEV_URANDOM - ' . mcrypt_create_iv(10, MCRYPT_DEV_URANDOM) . '<br />';
?>
(6-6/6)