Commit:    7aed2390503bfe91c91eec67ed0c88b12ff3612c
Author:    Nikita Popov <ni...@php.net>         Mon, 13 Aug 2012 21:46:15 +0200
Parents:   9bc1af1e5855c8cfc6886b5aaedbcb86a2ef42d7
Branches:  PHP-5.3 PHP-5.4 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=7aed2390503bfe91c91eec67ed0c88b12ff3612c

Log:
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).

Changed paths:
  M  ext/mcrypt/tests/mcrypt_create_iv.phpt


Diff:
diff --git a/ext/mcrypt/tests/mcrypt_create_iv.phpt 
b/ext/mcrypt/tests/mcrypt_create_iv.phpt
index cf6456f..1aa4886 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


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to