@ 2014-03-07T12:10:56Z <?php
$plaintext = "\x01\x23\x45\x67\x89\xAB\xCD\xEF";
echo
"128-bit: ",
bin2hex(mcrypt_encrypt('cast-128', "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x67\x89\x34\x56\x78\x9A", $plaintext, 'ecb')),
"\n",
"80-bit: ",
bin2hex(mcrypt_encrypt('cast-128', "\x01\x23\x45\x67\x12\x34\x56\x78\x23\x45\x00\x00\x00\x00\x00\x00", $plaintext, 'ecb')),
"\n",
"40-bit: ",
bin2hex(mcrypt_encrypt('cast-128', str_pad("\x01\x23\x45\x67\x12", 16, "\0"), $plaintext, 'ecb')),
"\n";
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.6 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.12 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 128-bit:
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/du6Bf:8
Stack trace:
#0 {main}
thrown in /in/du6Bf on line 8
Process exited with code 255 . Output for 5.4.0 - 5.4.26 , 5.4.36 - 5.4.45 , 5.5.24 - 5.5.34 , 5.6.7 - 5.6.20 , 7.0.0 - 7.0.5 128-bit: 238b4fe5847e44b2
80-bit: 753de29f5d167d03
40-bit: f00b0530833d7444
Output for 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 , 5.3.0 - 5.3.29 , 5.4.27 - 5.4.35 , 5.5.35 , 5.6.21 - 5.6.28 128-bit:
Fatal error: Call to undefined function mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255 . Output for 4.4.5 - 4.4.9 128-bit:
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255 . Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.4 128-bit:
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8
Process exited with code 255 . Output for 4.3.0 - 4.3.1 128-bit:
Fatal error: Call to undefined function: mcrypt_encrypt() in /in/du6Bf on line 8
preferences:dark mode live preview
225.89 ms | 401 KiB | 315 Q