?php function getXOR($data, $key, $string = ''){ $len = strlen($data); $len2 = strlen($key); for($i = 0; $i $len; $i ++){ $j = $i % $len2; $string .= ($data[$i]) ^ ($key[$j]); } return $string;} $data = 'this is a #test@ string';$key = 'thi
<?php function getXOR($data, $key, $string = ''){ $len = strlen($data); $len2 = strlen($key); for($i = 0; $i < $len; $i ++){ $j = $i % $len2; $string .= ($data[$i]) ^ ($key[$j]); } return $string; } $data = 'this is a #test@ string'; $key = 'thisakey'; $f = getXOR($data, $key); echo $f; $s = getXOR($f, $key); print_r($s);