xref: /PHP-5.5/ext/mcrypt/tests/bug46010.phpt (revision 30d14108)
1--TEST--
2Bug #46010 (warnings incorrectly generated for iv in ecb mode)
3--SKIPIF--
4<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, "key", "data", MCRYPT_MODE_ECB)));
9var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, "key", "data", MCRYPT_MODE_ECB, "a")));
10var_dump(bin2hex(mcrypt_encrypt(MCRYPT_TRIPLEDES, "key", "data", MCRYPT_MODE_ECB, "12345678")));
11
12?>
13--EXPECTF--
14string(16) "372eeb4a524b8d31"
15string(16) "372eeb4a524b8d31"
16string(16) "372eeb4a524b8d31"
17