hex($data, $size); $total++; if($hash === $comp) $ok++; } echo "{$ok} / {$total} test(s) passed.".PHP_EOL;