Bitdefender Hypervisor Memory Introspection
crc32.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _CRC32_H_
6 #define _CRC32_H_
7 
8 #include "introtypes.h"
9 
10 __nonnull() DWORD
12  _In_ const void *Buffer,
13  _In_ size_t Size,
14  _In_ DWORD InitialCrc
15  );
16 
17 __nonnull() DWORD
19  _In_ const void *Buffer,
20  _In_ size_t Size,
21  _In_ DWORD InitialCrc
22  );
23 
24 __nonnull() DWORD
26  _In_ const char *String,
27  _In_ DWORD InitialCrc
28  );
29 
30 __nonnull() DWORD
32  _In_ const WCHAR *String,
33  _In_ DWORD InitialCrc
34  );
35 
36 DWORD
38  _In_ const WCHAR *String,
39  _In_ DWORD InitialCrc,
40  _In_ size_t MaxLength,
41  _Out_ BOOLEAN *Valid
42  );
43 
44 DWORD
46  _In_ const char *String,
47  _In_ DWORD InitialCrc,
48  _In_ size_t MaxLength,
49  _Out_ BOOLEAN *Valid
50  );
51 
52 #endif // _CRC32_H_
_Bool BOOLEAN
Definition: intro_types.h:58
#define _Out_
Definition: intro_sal.h:22
DWORD Crc32Compute(const void *Buffer, size_t Size, DWORD InitialCrc)
Computes the CRC for a byte array.
Definition: crc32.c:103
#define _In_
Definition: intro_sal.h:21
DWORD Crc32WstringLen(const WCHAR *String, DWORD InitialCrc, size_t MaxLength, BOOLEAN *Valid)
Computes the CRC for a NULL-terminated wide char string, but without exceeding a maximum number of ch...
Definition: crc32.c:259
DWORD Crc32StringLen(const char *String, DWORD InitialCrc, size_t MaxLength, BOOLEAN *Valid)
Computes the CRC for a NULL-terminated utf-8 string, but without exceeding a maximum number of charac...
Definition: crc32.c:301
DWORD Crc32Wstring(const WCHAR *String, DWORD InitialCrc)
Computes the CRC for a NULL-terminated wide char string.
Definition: crc32.c:226
uint16_t WCHAR
Definition: intro_types.h:63
uint32_t DWORD
Definition: intro_types.h:49
DWORD Crc32ComputeFast(const void *Buffer, size_t Size, DWORD InitialCrc)
Definition: crc32.c:136
DWORD Crc32String(const char *String, DWORD InitialCrc)
Computes the CRC for a NULL-terminated utf-8 string.
Definition: crc32.c:200