Creates an AES key object of the specified length from random data that can later be used for encryption.
#include "huaes.h"
int hu_AESEncryptKeyGen(sb_Params aesParams, size_t keyLen, sb_Key *aesKey, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The AES parameters object.
The length (in bits) of the AES key value. The acceptable values are SB_AES_128_KEY_BITS, SB_AES_192_KEY_BITS, SB_AES_256_KEY_BITS, SB_AES_128_XTS_KEY_BITS and SB_AES_256_XTS_KEY_BITS.
The AES key object pointer.
A global context.
If the key will be used for encryption and decryption, hu_AESKeyGen() should be called instead of this function.
In XTS mode, two AES keys are used. Therefore, the key size for XTS mode is twice as large as an AES key.
The AES parameter object must have been created with an RNG context.
The aesParams object is NULL.
The tag for the params object is not of the expected type.
keyLen is an invalid key length.
The aesKey object pointer is NULL.
Memory allocation failure.
Success.