Вроде так. C++ под рукой нету, посчитать контрольный пример не могу.
Код:
function Hash(AByte, NBit: Byte; CRC: Cardinal): Cardinal;
var
i: Integer;
begin
for i := 0 to NBit - 1 do begin
if ((AByte xor (CRC shr 8)) and $80) <> 0 then begin
CRC := CRC shl 1;
CRC := CRC xor $8F57;
end else
CRC := CRC shl 1;
AByte := AByte shl 1;
end;
Result := CRC;
end;