Skip to main content

SecurityLocalDecryptAES192GCM

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Description

Decrypts ciphered data with a given key, initialization vector and additional authenticated data. The decryption is AES192 (GCM). Also verifies result with tag.

Parameters

  • byte key[]: The key to be used for AES (192 bit)
  • 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 cipheredData[]: The ciphered data to decrypt
  • dword cipheredDataLength: The length of the ciphered data
  • byte tag[]: The verification tag for the ciphered text
  • dword tagLength: The length of the verification tag, must equal 16
  • byte plainData[] [out]: The buffer in which the plain data is stored
  • dword plainDataLength [in/out]: The length of the buffer. Typically, this buffer should have the same length as the ciphered data buffer

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

SecurityLocalEncryptAES128GCMSecurityLocalDecryptAES256GCMSecurityLocalEncryptAES192GCM