时间:2021-07-01 10:21:17 帮助过:20人阅读
$check = str_split($verify_data, 2); // 将16进制数据转换成两个一组的数组
for ($j = 0; $j < count($check); $j++) {
$data = str_pad(base_convert($check[$j],16,2),8,0,STR_PAD_LEFT);
$xor = $xor ^ $data;
$xor = str_pad($xor,8,0,STR_PAD_LEFT);
}
echo "XOR:" . $xor . "\r\n";
echo "REVC_XOR:" . $revc_xor . "\r\n\r\n";
$s = '81000000003e900000000000000010001031323334353632';00000111
$a = unpack('C*', pack('H*', $s));
$x = 29;
foreach($a as $v) $x ^= $v;
printf('%08b', $x);