• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4193
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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