Newton Dynamics  4.00
dCRC.h
1 /* Copyright (c) <2003-2019> <Newton Game Dynamics>
2 *
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely
10 */
11 
12 #ifndef __dCRC_H__
13 #define __dCRC_H__
14 
15 #include "dCoreStdafx.h"
16 
17 D_CORE_API dUnsigned64 dCRC64 (const char* const string, dUnsigned64 crcAcc = 0);
18 D_CORE_API dUnsigned64 dCRC64 (const void* const buffer, dInt32 size, dUnsigned64 crcAcc);
19 
20 inline dUnsigned64 dCombineCRC(dUnsigned64 a, dUnsigned64 b)
21 {
22  return (a << 8) ^ b;
23 }
24 
25 
26 #endif
27