diff options
author | Nikita Popov <nikic@php.net> | 2012-08-13 21:46:15 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2012-08-13 22:01:19 +0200 |
commit | 7aed2390503bfe91c91eec67ed0c88b12ff3612c (patch) | |
tree | db51dfcf775ed6374e97e886ef5a5e9ecb29fc7a | |
parent | 9bc1af1e5855c8cfc6886b5aaedbcb86a2ef42d7 (diff) | |
download | php-git-7aed2390503bfe91c91eec67ed0c88b12ff3612c.tar.gz |
Ask for less random data in mcrypt_create_iv
Otherwise the RNG blocks and the test takes a lot of time to run (and
occasionally fails).
-rw-r--r-- | ext/mcrypt/tests/mcrypt_create_iv.phpt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mcrypt/tests/mcrypt_create_iv.phpt b/ext/mcrypt/tests/mcrypt_create_iv.phpt index cf6456fef7..1aa48868b0 100644 --- a/ext/mcrypt/tests/mcrypt_create_iv.phpt +++ b/ext/mcrypt/tests/mcrypt_create_iv.phpt @@ -5,13 +5,13 @@ mcrypt_create_iv --FILE-- <?php $iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND); -$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM); -$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM); +$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM); +$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM); echo strlen($iv1) . "\n"; echo strlen($iv2) . "\n"; echo strlen($iv3) . "\n"; --EXPECT-- 16 -24 -32 +16 +16 |