nn::crypto::CcmEncryptor::Initialize Member Function
void Initialize(
const BlockCipher & c,
const void * pIv,
size_t ivSize,
size_t adataSize,
size_t pdataSize,
size_t macSize
);
| Name | Description | |
|---|---|---|
| in | c | Instance of the block encryption implementation used in encryption. |
| in | pIv | Pointer to the buffer storing the IV. |
| in | ivSize | IV size in bytes. |
| in | adataSize | Adata size in bytes. |
| in | pdataSize | Pdata size in bytes. |
| in | macSize | MAC size in bytes. |
Initializes encryption in CCM mode.
For c, specify an instance of a class derived from the BlockCipher class that implements the block cipher used in encryption. You must have previously used the BlockCipher::SetKey function to set the key used in encryption.
Specify a pointer to an IV object in pIv, and its size in ivSize. The IV is called a "nonce" in CCM mode. The value in ivSize must be at least 7 and no more than 13. You cannot specify 13 if pdataSize exceeds 0x01000000 bytes. Nintendo strongly recommends specifying 12 or 13.
The value in macSize must be an even number of at least 4 and no more than 16. Nintendo strongly recommends specifying 16.
CONFIDENTIAL