バイナリをXORしたいのですが、結果はまだ間違っていますxor xorサンプルスクリプト:
function _xor($text,$key){
for($i=0; $i<strlen($text); $i++){
for($j=0; $j<strlen($key);$j++){
$text[$i] = $text[$i]^$key[$j];
}
}
return $text;
}
そしてこれは結果です:
10011110
結果はxor
01100001
01100010
--------
00000011
正解を教えてください