Skip to main content

SecurityLocalEncryptAES192GCM

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Description

Encrypts data with a given key, initialization vector and additional authenticated data. The encryption is AES192 (GCM). Also stores tag in separate buffer.

Parameters

  • byte key[]: The key to be used for AES (24 bytes)
  • dword keyLength: 24 (bytes)
  • byte iv[]: The init vector
  • dword ivLength: The length of the init vector
  • byte aad[]: The additional authenticated data
  • dword aadLength: The length of the additional authenticated data
  • byte plainData[]: The data to encrypt
  • dword plainDataLength: The length of the data
  • byte tag[][out]: The buffer where to store the verification tag for the ciphered text
  • dword tagLength: 16 (bytes)
  • byte cipheredData[][out]: The buffer in which the ciphered data is stored.
  • dword cipheredDataLength [in/out]: The length of the buffer. Typically, this buffer should have the same length as the data to encrypt.

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

SecurityLocalEncryptAES128GCMSecurityLocalEncryptAES256GCMSecurityLocalDecryptAES192GCM