1--TEST--
2mcrypt_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);
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);
10
11echo strlen($iv1) . "\n";
12echo strlen($iv2) . "\n";
13echo strlen($iv3) . "\n";
14--EXPECTF--
15Deprecated: Function mcrypt_get_iv_size() is deprecated in %s%emcrypt_create_iv.php on line 2
16
17Deprecated: Function mcrypt_create_iv() is deprecated in %s%emcrypt_create_iv.php on line 2
18
19Deprecated: Function mcrypt_get_iv_size() is deprecated in %s%emcrypt_create_iv.php on line 3
20
21Deprecated: Function mcrypt_create_iv() is deprecated in %s%emcrypt_create_iv.php on line 3
22
23Deprecated: Function mcrypt_get_iv_size() is deprecated in %s%emcrypt_create_iv.php on line 4
24
25Deprecated: Function mcrypt_create_iv() is deprecated in %s%emcrypt_create_iv.php on line 4
2616
2716
2816
29