Skip to main content

SecurityLocalGenerateHashMACSHA256

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Description

Generates a SHA256 hash for the given data, using the given key.

Parameters

  • byte key[]: The key to be used.
  • dword keyLength: 16 (bytes).
  • byte data[]: The data to encrypt.
  • dword dataLength: The length of the data to encrypt.
  • *byte hashMac[Out]**: The generated SHA256 hash MAC.

Return Values

  • 1: Success
    A Value of 1 means that the action was successful.
  • <= 0: Error
    A value less than or equal to 0 means error.

Example