Yes, I seeded it with 0. Here's the code I used:
UInt16 crc16;
Byte crcMSB, crcLSB;
Byte *byteP;
crc16 = Crc16CalcBlock(inputStr, StrLen(inputStr), 0);
byteP = (Byte *)(&crc16);
crcLSB = *(byteP);
byteP++;
crcMSB = *(byteP);
With inputStr pointing at "The", MSB ends up with 0x8e, LSB with 0x3c. They
should be 0x3b and 0xae, respectively. Any suggestions? Thanks for your
help...
oge
> -----Original Message-----
> From: Jim Schram [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 19, 1999 13:25
> To: [EMAIL PROTECTED]
> Subject: Re: Crc16CalcBlock
>
> At 10:03 AM -0800 1999/03/19, Emry, Owen wrote:
> >Is there a trick to using Crc16Calc Block? The results it gives don't
> seem
> >to match what I get by other means, including long division by hand.
> >
> >Does it use the "standard" crc-16 polynomial? (i.e. x^16 + x^15 + x^2 +
> >x^0)
>
> The body of the code is basically:
>
> if ( count )
> do
> { crc = (crc << 8) ^ crctt[ (Byte)((crc >> 8) ^ *byteP++) ]; }
> while ( --count );
>
> return( crc & 0xffff );
>
> What seed value did you use? We use 0 with a standard lookup table for
> crctt.
>
> Regards,
>
> Jim Schram
> 3Com/Palm Computing
> Partner Engineering