F_BA_CmpHash

F_BA_CmpHash detects changes in data by comparing hashes. This function calculates a hash value for the input data and compares it to a stored hash value. If the hash values are different, the data has changed.
![]() | Advantage: No redundant storage is required. Disadvantage: About 3 times slower than a direct memory comparison. Recommended use: When comparing small data blocks. |
Syntax
FUNCTION F_BA_CmpHash : BOOL
VAR_INPUT
pData : PVOID;
nSize : UINT;
END_VAR
VAR_IN_OUT
nHash : DWORD;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
pData |
PVOID |
Pointer to the data to be checked. |
|
nSize |
UINT |
Size of the data in bytes. |
Inputs/outputs
|
Name |
Type |
Description |
|---|---|---|
|
nHash |
DWORD |
Stored hash value (updated when a change is detected) |
