By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,313 Members | 2,725 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,313 IT Pros & Developers. It's quick & easy.

CRC32 for a unsigned array in C++

P: 2

I need to calculate the crc32 value for an unsigned array in C++.It goes like this..

unsigned char Myarray[16];

//Myarray contains hex value ... b525b4d0ad533acee2d6a214453a279e

Need to calculate the crc32 value for this Myarray[].
Have done something like this in java

bytes = md.digest( request.getBytes() );
// bytesToHex(bytes) -------> b525b4d0ad533acee2d6a214453a279e
CRC32 crc=new CRC32();
checksum = crc.getValue(); // gives checksum as ---> 2422938937

Need to get same value in C++ for the above mentioned Myarray[].

Thanks in advance. :)
Nov 15 '07 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 8,916
If you can't be bothered to write the algorithm yourself (and TBH I wouldn't bother) then I suggest you search for an implementation on the web. I find Wikipedia a good place to start for this sort of thing.

Oh and CRC32 isn't very descriptive as there are at least 4 different 32 bit CRCs functions in common usage.
Nov 15 '07 #2

P: 2
Thanks for the advice.. but i figured it out...!!
Nov 16 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.