Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. unsigned int get_crc32(unsigned char* buffer, unsigned int length, unsigned int seed)
  2. {
  3.   unsigned int crc = seed;
  4.   unsigned int i   = 0;
  5.  
  6.   while (length > 0)
  7.   {
  8.     crc  = crc_table[buffer[i] ^ (crc >> 24)] ^ (crc << 8);
  9.     length--;
  10.     i++;
  11.   }
  12.  
  13.   return crc;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement