Skip to main content
Open topic with navigation

SecurityLocalDecryptAES128CTR

CAPL Functions » Security » SecurityLocalDecryptAES128CTR Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Description

Decrypts ciphered data with a given key and initialization vector using AES128 (CTR), Padding Mode is not required.

Parameters

  • byte key[]: The key to be used for AES (128 bit).
  • dword keyLength: 16 (bytes).
  • byte cipheredData[]: The ciphered data to decrypt.
  • dword cipheredDataLength: The length of the ciphered data.
  • byte initVector[]: The init vector to be used.
  • dword initVectorLength: 16 (bytes).
  • byte plainData[] [Out]: The buffer in which the plain data is stored.
  • dword plainDataLength [In/Out]: The length of the buffer for the plain data. 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