PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/mcrypt/tests/bug62102_rfc2144.phpt ('RFC 2144 test vectors for CAST-128 in ECB mode (bug #62102)')

Script

1: <?php
2: $plaintext 
"\x01\x23\x45\x67\x89\xAB\xCD\xEF";
3:
4: echo
5:
6:
"128-bit: ",
7:
bin2hex(mcrypt_encrypt('cast-128'"\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x67\x89\x34\x56\x78\x9A"$plaintext'ecb')),
8:
"\n",
9:
"80-bit: ",
10:
bin2hex(mcrypt_encrypt('cast-128'"\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45"$plaintext'ecb')),
11:
"\n",
12:
"40-bit: ",
13:
bin2hex(mcrypt_encrypt('cast-128'"\x01\x23\x45\x67\x12"$plaintext'ecb')),
14:
"\n";
15:
16:
?>
17:

Expected

128-bit: 238b4fe5847e44b2
80-bit: eb6a711a2c02271b
40-bit: 7ac816d16e9b302e

Output

128-bit: 238b4fe5847e44b2
80-bit: 
Warning: mcrypt_encrypt(): Key of size 10 not supported by this algorithm. Only keys of size 16 supported in /var/php_gcov/PHP_5_6/ext/mcrypt/tests/bug62102_rfc2144.php on line 10

40-bit: 
Warning: mcrypt_encrypt(): Key of size 5 not supported by this algorithm. Only keys of size 16 supported in /var/php_gcov/PHP_5_6/ext/mcrypt/tests/bug62102_rfc2144.php on line 13

Diff

002+ 80-bit: 
003+ Warning: mcrypt_encrypt(): Key of size 10 not supported by this algorithm. Only keys of size 16 supported in /var/php_gcov/PHP_5_6/ext/mcrypt/tests/bug62102_rfc2144.php on line 10
002- 80-bit: eb6a711a2c02271b
003- 40-bit: 7ac816d16e9b302e
004+ 
005+ 40-bit: 
006+ Warning: mcrypt_encrypt(): Key of size 5 not supported by this algorithm. Only keys of size 16 supported in /var/php_gcov/PHP_5_6/ext/mcrypt/tests/bug62102_rfc2144.php on line 13

 

Generated at Thu, 21 Aug 2014 20:14:55 +0000 (46 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.