Link to home
Start Free TrialLog in
Avatar of youngzaphod
youngzaphod

asked on

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.


ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ajay-Singh
Ajay-Singh

checkout this:


        CRC32 crc = new CRC32();
        crc.update(...);
        long hash = crc.getValue()
Avatar of youngzaphod

ASKER

wow that was fast! Thank you both!
:-)