nn::crypto::DecryptAndVerifyAes128Ccm Function
bool DecryptAndVerifyAes128Ccm(
void * pDst,
const void * pSrc,
size_t srcSize,
const void * pKey
);
| Name | Description | |
|---|---|---|
| out | pDst | Pointer to the buffer storing the decryption results. This buffer must be at least as big as srcSize - GENERATE_HEADER_SIZE. |
| in | pSrc | Pointer to the buffer storing the ciphertext. |
| in | srcSize | Ciphertext size in bytes. |
| in | pKey | Pointer to the buffer storing the key. The key is 16 bytes in length. |
TRUE, there is likely no tampering. If FALSE, the file has likely been tampered with. Decrypts and tests for tampering.
Decrypts data encrypted using the EncryptAndGenerateAes128Ccm function, and tests the decrypted data to see if it has been tampered with.
Data decrypted by this function is reduced in size by GENERATE_HEADER_SIZE (that is, 16) bytes. Consequently, the buffer pointed to by pDst must be big enough to hold srcSize - GENERATE_HEADER_SIZE bytes of data.
CONFIDENTIAL