Annotation of embedaddon/php/ext/mcrypt/tests/mcrypt_create_iv.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: mcrypt_create_iv
3: --SKIPIF--
4: <?php if (!extension_loaded("mcrypt")) print "skip"; ?>
5: --FILE--
6: <?php
7: $iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND);
1.1.1.2 ! misho 8: $iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
! 9: $iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
1.1 misho 10:
11: echo strlen($iv1) . "\n";
12: echo strlen($iv2) . "\n";
13: echo strlen($iv3) . "\n";
14: --EXPECT--
15: 16
1.1.1.2 ! misho 16: 16
! 17: 16
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>