F_GenerateHashValue

The function can be used to calculate a hash value.

FUNCTION F_GenerateHashValue : BOOL

VAR_INPUT

VAR_INPUT
    hashMode : E_HashMode;
    pData    : PVOID;
    nData    : UDINT;
    pHash    : PVOID;    // destination buffer for generated hash value
    nHash    : UDINT;
END_VAR

hashMode: a hash mode, such as SHA 512, is specified here. See E_HashMode.

pData: the address of the input data is specified here.

nData: the size of the input data in bytes is specified here.

pHash: here the address of the buffer is specified where the hash value is to be stored.

nHash: the size of the buffer for the hash value is specified here. The size depends on the hash mode, see also E_HashMode.

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.4024.29

PC or CX (x86, x64, ARM)

Tc2_Utilities (System) >= 3.3.51.0