F_GenerateHashValue
The function can be used to calculate a hash value.
If the calculation is successful, the function returns TRUE.
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; // size of destination buffer in bytes. This needs to match the hash mode.
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 in bytes is specified here. The size depends on the hash mode, see also E_HashMode. The appropriate size must be specified. Otherwise the function will fail.
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 |