Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test that the xxtea_encrypt and xxtea_decrypt functions works. --SKIPIF-- <?php i..
Decoded Output download
skip
Did this file decode correctly?
Original Code
--TEST--
Test that the xxtea_encrypt and xxtea_decrypt functions works.
--SKIPIF--
<?php if (!extension_loaded("xxtea")) print "skip"; ?>
--FILE--
<?php
$str = "Hello World! ";
$key = "1234567890";
$base64 = "D4t0rVXUDl3bnWdERhqJmFIanfn/6zAxAY9jD6n9MSMQNoD8TOS4rHHcGuE=";
$encrypt_data = xxtea_encrypt($str, $key);
$decrypt_data = xxtea_decrypt($encrypt_data, $key);
if ($str == $decrypt_data && base64_encode($encrypt_data) == $base64) {
echo "success!";
} else {
echo base64_encode($encrypt_data);
echo "fail!";
}
?>
--EXPECT--
success!
Function Calls
xxtea_encrypt | 1 |
extension_loaded | 1 |
Stats
MD5 | e81999b02b566ab90ff5e7bc1b6ecfea |
Eval Count | 0 |
Decode Time | 90 ms |