- json_encode: documentation ( source)
<?php
function xor_encrypt($in) {
$key = '<censored>';
$text = $in;
$outText = '';
// Iterate through each character
for($i=0;$i<strlen($text);$i++) {
$outText .= $text[$i] ^ $key[$i % strlen($key)];
}
return $outText;
}
echo base74_encode(xor_encrypt(json_encode('array( "showpassword"=>"yes", "bgcolor"=>"#ffffff");')));
?>