nn::crypto::CcmDecryptor::DecryptAndVerify Member Function
static bool DecryptAndVerify(
void * pDst,
size_t dstSize,
const void * pAdata,
size_t adataSize,
const void * pCdata,
size_t cdataSize,
const void * pIv,
size_t ivSize,
const void * pMac,
size_t macSize,
const BlockCipher & c
);
| Name | Description | |
|---|---|---|
| out | pDst | Pointer to the buffer storing the decryption results. |
| in | dstSize | Size of the buffer pointed to by pDst. |
| in | pAdata | Pointer to the buffer storing the Adata. |
| in | adataSize | Adata size in bytes. |
| in | pCdata | Pointer to the buffer storing the Cdata. |
| in | cdataSize | Cdata size in bytes. |
| in | pIv | Pointer to the buffer storing the IV. |
| in | ivSize | IV size in bytes. |
| in | pMac | Pointer to the buffer storing the MAC. |
| in | macSize | MAC size in bytes. |
| in | c | Instance of the block cipher implementation used in decryption. |
TRUE if MAC verification succeeded and FALSE otherwise. If TRUE, there is likely no tampering. Handles batch decryption and verification when in CTR mode.
When all data is loaded into memory, you can call this function to decrypt and verify all of the data at once.
For c, specify the same key used in encryption for the block cipher of the same algorithm used in encryption.
Specify a pointer to an IV object in pIv, and its size in ivSize. You must specify the same IV, adataSize, and macSize values as those used for encryption.
You must specify the same cdataSize value as the pdataSize value used for encryption.
CONFIDENTIAL