Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. 64 bit Crc Polynomial ?

64 bit Crc Polynomial ?

Scheduled Pinned Locked Moved C / C++ / MFC
comquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nibu babu thomas
    wrote on last edited by
    #1

    Does somebody know of a 64 bit Crc polynomial? Thanks in advance.


    Nibu thomas A Developer Programming tips[^]  My site[^]

    P S 2 Replies Last reply
    0
    • N Nibu babu thomas

      Does somebody know of a 64 bit Crc polynomial? Thanks in advance.


      Nibu thomas A Developer Programming tips[^]  My site[^]

      P Offline
      P Offline
      Programm3r
      wrote on last edited by
      #2

      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

      N 1 Reply Last reply
      0
      • P 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

        N Offline
        N Offline
        Nibu babu thomas
        wrote on last edited by
        #3

        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[^]

        P 1 Reply Last reply
        0
        • N Nibu babu thomas

          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[^]

          P Offline
          P Offline
          Programm3r
          wrote on last edited by
          #4

          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

          N 1 Reply Last reply
          0
          • P 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

            N Offline
            N Offline
            Nibu babu thomas
            wrote on last edited by
            #5

            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[^]

            1 Reply Last reply
            0
            • N Nibu babu thomas

              Does somebody know of a 64 bit Crc polynomial? Thanks in advance.


              Nibu thomas A Developer Programming tips[^]  My site[^]

              S Offline
              S Offline
              Stephen Hewitt
              wrote on last edited by
              #6

              This[^] might help. You can look at the source is you just want to see how it's done. Steve

              N 1 Reply Last reply
              0
              • S Stephen Hewitt

                This[^] might help. You can look at the source is you just want to see how it's done. Steve

                N Offline
                N Offline
                Nibu babu thomas
                wrote on last edited by
                #7

                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[^]

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups