Solved

CRC8 calculation

Posted on 2006-11-13
4
3,732 Views
Last Modified: 2011-10-03
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
Comment
Question by:youngzaphod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 17929479
0
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 17929485
checkout this:


        CRC32 crc = new CRC32();
        crc.update(...);
        long hash = crc.getValue()
0
 
LVL 2

Author Comment

by:youngzaphod
ID: 17929507
wow that was fast! Thank you both!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17929532
:-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven disable workspace resolution 1 43
SequenceInputStream example 3 23
Selenium docs api java index 3 69
learn programming 8 73
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question