- base64_decode: documentation ( source)
- json_encode: documentation ( source)
<?php
function xor_encrypt() {
$key = 'qw8J';
$text = json_encode(array("showpassword"=>"yes", "bgcolor"=>"#0000ff"));
$outText = base64_decode("ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw%3D");
for($i=0;$i<32;$i++) {
$outText .= $text[$i] ^ $key[$i % strlen($key)];
}
return $outText;
}
echo xor_encrypt();
?>