F_BA_CreateHash

F_BA_CreateHash 1:

Generates a hash value from memory data through an iterative calculation based on byte values and their positions.

F_BA_CreateHash 2:

This function calculates a simple hash value that can be used to detect changes in data blocks. The hash is generated by multiplying the data size by the byte size and adding all the byte values (weighted by their position).

Syntax

FUNCTION F_BA_CreateHash : DWORD
VAR_INPUT
  pData : PVOID;
  nSize : UINT;
END_VAR

F_BA_CreateHash 3: Inputs

Name

Type

Description

pData

PVOID

Pointer to the data to be hashed.

nSize

UINT

Size of the data in bytes.