Creates an AES key object from the given key value that can later be used for encryption.
#include "huaes.h"
int hu_AESEncryptKeySet(sb_Params aesParams, size_t keyLen, const unsigned char *keyValue, 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 key value.
The AES key object pointer.
A global context.
If the key will be used for both encryption and decryption, then hu_AESKeySet() 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 aesParams object is NULL.
The tag for the params object is not of the expected type.
keyLen is an invalid key length.
keyValue is NULL.
The aesKey object pointer is NULL.
Memory allocation failure.
Success.