0

Is there any idea how to do the following?

For example I have a 0x1100000000 (5 bytes total, 1 actual data byte and 4 zero bytes (padding))

I can calculate the needed CRC (crc32 in my case) on this data portion without any problems.

Then knowing the totacl CRC of 5 bytes and knowing the number of zero padding padding bytes is it possible to evaluate the CRC of the data byte (0x11 in my case)?

-Thanks in advance

dcs
  • 11
  • 1
  • What program/library are you using to calculate the crc? – cyon Jun 11 '14 at 08:21
  • I am doing it in FPGA. It's not a programming issue. I just am asking about an idea of doing this. – dcs Jun 11 '14 at 08:55
  • If you know the length of your padding portion, can you not just always mask the padding portion with zeroes before you calculate the crc? That way any corruptions in the padding portion will be ignored which is what I think you are trying to achieve. – cyon Jun 11 '14 at 09:16
  • Yes. You can run a CRC in reverse. Answered [here with source code](http://stackoverflow.com/a/22356300/1180620). – Mark Adler Jun 11 '14 at 17:00

0 Answers0