Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. void calculateCrc(char* hashString, DWORD& crc32)
  2. {
  3.     crc32 = 0xFFFFFFFF;
  4.     ifstream hashFile(hashString, ios::binary);
  5.  
  6.     hashFile.peek();
  7.  
  8.     while(!hashFile.eof())
  9.     {
  10.         crc32 = (crc32 >> 8) ^ crc32Table[(crc32 &0xFF) ^ hashFile.get()];
  11.         hashFile.peek();
  12.     }
  13.  
  14.     hashFile.close()
  15.  
  16.     crc32 = ~crc32;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement