Exemplo n.º 1
0
function get_checksum($cs)
{
    $var = computeUnsignedCRC32($cs);
    $x = '0x';
    $a = substr($var, 0, 2);
    $a = $x . $a;
    $b = substr($var, 2, 2);
    $b = $x . $b;
    $c = substr($var, 4, 2);
    $c = $x . $c;
    $d = substr($var, 6, 2);
    $d = $x . $d;
    return chr($d) . chr($c) . chr($b) . chr($a);
}
Exemplo n.º 2
0
function get_checksum($cs)
{
    $var = computeUnsignedCRC32($cs);
	//echo "crchex: ".$var."<br/>";
	$x = ('0x');
	$a = substr($var, 0, 2);
	$a = $x.$a;
	$b = substr($var, 2, 2);
	$b = $x.$b;
	$c = substr($var, 4, 2);
	$c = $x.$c;
	$d = substr($var, 6, 2);
	$d = $x.$d;
	return chr($d).chr($c).chr($b).chr($a);
}