• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3990
  • Last Modified:

CRC8 calculation

Hi there,

I am trying to implement a CRC8 algorithm in Java. I understand the algorithm, but it would save me a lot of time, if I get some implementation hints.
I want to calculate the CRC8 value of a HEX String that is 15 bytes long and store the CRC value in one byte.
I know that there is a utility called jacksum, but I don't want to use it, because I would have to make my application open source (jacksum is GPL).
If you insert a complete algorithm that gets a string data value and a poly as arguments and returns the string crc value, you'll instantly get the 500 points.

Thanks a lot.


0
youngzaphod
Asked:
youngzaphod
  • 2
1 Solution
 
CEHJCommented:
0
 
Ajay-SinghCommented:
checkout this:


        CRC32 crc = new CRC32();
        crc.update(...);
        long hash = crc.getValue()
0
 
youngzaphodAuthor Commented:
wow that was fast! Thank you both!
0
 
CEHJCommented:
:-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now