pub unsafe extern "C" fn PS_EncryptSignDecryptVerifyAesCcm(
    in_: *mut u8_,
    in_size: u32_,
    out: *mut u8_,
    out_size: u32_,
    data_len: u32_,
    mac_data_len: u32_,
    mac_len: u32_,
    aes_algo: PS_AESAlgorithm,
    key_type: PS_AESKeyType,
    nonce: *mut u8_
) -> Result
Expand description

Encrypts/Decrypts signed AES CCM data. When decrypting, if the MAC is invalid, 0xC9010401 is returned. After encrypting the MAC is located at inputbufptr.

§Arguments

  • in - Input buffer.
  • in_size - Size of the input buffer. Must include MAC size when decrypting.
  • out - Output buffer.
  • out_size - Size of the output buffer. Must include MAC size when encrypting.
  • data_len - Length of the data to be encrypted/decrypted.
  • mac_data_len - Length of the MAC data.
  • mac_len - Length of the MAC.
  • aes_algo - AES algorithm to use.
  • key_type - Key type to use.
  • nonce - Pointer to the nonce.