64 bit Crc Polynomial ?
-
Does somebody know of a 64 bit Crc polynomial? Thanks in advance.
Nibu thomas A Developer Programming tips[^] My site[^]
-
Does somebody know of a 64 bit Crc polynomial? Thanks in advance.
Nibu thomas A Developer Programming tips[^] My site[^]
Hi, I dont have code for a 64 bit crc, but maybe this crc16 might help you. Hope it will help. Function: short int crc16(int *pBuf, short int Len, short int InitialCrc){ short int crc=0, i=0; crc = 0; for (i = 0; i < Len; i++ ) { crc = (crc >> 8) | (crc << 8); crc = crc ^ *pBuf; crc = crc ^ ((crc & 0xff) >> 4); crc = crc ^ (crc << 12); crc = crc ^ ((crc & 0xff) << 5); pBuf++; } return(crc); } int main() { int *ibuf = new char[len]; short int crc; Memo1->GetTextBuf(ibuf,len); crc = crc16(&ibuf[0],len,0); Edit2->Text = len; Edit3->Text = IntToHex(crc,4); delete[] ibuf; } Regards Programm3r
-
Hi, I dont have code for a 64 bit crc, but maybe this crc16 might help you. Hope it will help. Function: short int crc16(int *pBuf, short int Len, short int InitialCrc){ short int crc=0, i=0; crc = 0; for (i = 0; i < Len; i++ ) { crc = (crc >> 8) | (crc << 8); crc = crc ^ *pBuf; crc = crc ^ ((crc & 0xff) >> 4); crc = crc ^ (crc << 12); crc = crc ^ ((crc & 0xff) << 5); pBuf++; } return(crc); } int main() { int *ibuf = new char[len]; short int crc; Memo1->GetTextBuf(ibuf,len); crc = crc16(&ibuf[0],len,0); Edit2->Text = len; Edit3->Text = IntToHex(crc,4); delete[] ibuf; } Regards Programm3r
Programm3r wrote:
Hi, I dont have code for a 64 bit crc, but maybe this crc16 might help you. Hope it will help.
Thanks. I don't need code for Crc. I just need a widely used 64 bit Crc polynomial. Just like the ones we have for 32 bit Crc's. :)
Nibu thomas A Developer Programming tips[^] My site[^]
-
Programm3r wrote:
Hi, I dont have code for a 64 bit crc, but maybe this crc16 might help you. Hope it will help.
Thanks. I don't need code for Crc. I just need a widely used 64 bit Crc polynomial. Just like the ones we have for 32 bit Crc's. :)
Nibu thomas A Developer Programming tips[^] My site[^]
Well in that case .... my bad :laugh: . Have you tried checcking google? maybe this will help, if you haven't already checked it out.... http://en.wikipedia.org/wiki/Cyclic_redundancy_check[^] Programm3r
-
Well in that case .... my bad :laugh: . Have you tried checcking google? maybe this will help, if you haven't already checked it out.... http://en.wikipedia.org/wiki/Cyclic_redundancy_check[^] Programm3r
Programm3r wrote:
Well in that case .... my bad . Have you tried checcking google?
God bless you. I did search google. But these days you should search Wikipedia too. :-D Just what I wanted.
Nibu thomas A Developer Programming tips[^] My site[^]
-
Does somebody know of a 64 bit Crc polynomial? Thanks in advance.
Nibu thomas A Developer Programming tips[^] My site[^]
-
Stephen Hewitt wrote:
You can look at the source is you just want to see how it's done.
I do get lost trying to find out a proper polynomial myself. I am still lost. That's why I try to go for a widely used polynomial. I will try out that link. Thank you.
Nibu thomas A Developer Programming tips[^] My site[^]