Retrieves the key value and its length from an AES key object.
#include "huaes.h"
int hu_AESKeyGet(sb_Params aesParams, sb_Key aesKey, size_t *keyLen, unsigned char *keyValue, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The AES parameters object.
The AES key object.
The length (in bits) of the AES key value.
The key value.
A global context.
If the length of the key value is known, a pointer to a buffer large enough to hold the key value should be passed in keyValue and its length in keyLen. This function will copy the key value into keyValue and set the actual length of the key value in keyLen.
If keyValue is NULL, then this function will set the correct length of the key value in keyLen. If keyValue is not NULL but keyLen is too small, this function will return an error and also will set the correct length of the key value in keyLen.
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.
The aesKey object is NULL.
The aesKey object is invalid.
keyLen is NULL.
The keyValue buffer length is invalid.
The key value cannot be exported from the aesKey object.
Success.