/* This file is part of Universal Modding Engine. Universal Modding Engine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Universal Modding Engine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Universal Modding Engine. If not, see . */ #include "uMod_Main.h" void GetHash( unsigned char *str, unsigned int len, DWORD64 &hash) // estimate the hash { DWORD32 hash1 = hash & 0xFFFFFFFF; DWORD32 hash2 = hash>>32 & 0xFFFFFFFF; for (int i=0; i>=1) { crc = (crc >> 1) ^ (((crc ^ data) & 1) ? CRC32POLY : 0); } } return (crc); }