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