Lines Matching refs:aContext

107 static bool checkContext(otCryptoContext *aContext, size_t aMinSize)  in checkContext()  argument
110 return aContext != NULL && aContext->mContext != NULL && aContext->mContextSize >= aMinSize; in checkContext()
220 otError otPlatCryptoHmacSha256Init(otCryptoContext *aContext) in otPlatCryptoHmacSha256Init() argument
224 if (!checkContext(aContext, sizeof(psa_mac_operation_t))) { in otPlatCryptoHmacSha256Init()
228 operation = aContext->mContext; in otPlatCryptoHmacSha256Init()
234 otError otPlatCryptoHmacSha256Deinit(otCryptoContext *aContext) in otPlatCryptoHmacSha256Deinit() argument
238 if (!checkContext(aContext, sizeof(psa_mac_operation_t))) { in otPlatCryptoHmacSha256Deinit()
242 operation = aContext->mContext; in otPlatCryptoHmacSha256Deinit()
247 otError otPlatCryptoHmacSha256Start(otCryptoContext *aContext, const otCryptoKey *aKey) in otPlatCryptoHmacSha256Start() argument
252 if (aKey == NULL || !checkContext(aContext, sizeof(psa_mac_operation_t))) { in otPlatCryptoHmacSha256Start()
256 operation = aContext->mContext; in otPlatCryptoHmacSha256Start()
262 otError otPlatCryptoHmacSha256Update(otCryptoContext *aContext, const void *aBuf, in otPlatCryptoHmacSha256Update() argument
267 if (aBuf == NULL || !checkContext(aContext, sizeof(psa_mac_operation_t))) { in otPlatCryptoHmacSha256Update()
271 operation = aContext->mContext; in otPlatCryptoHmacSha256Update()
276 otError otPlatCryptoHmacSha256Finish(otCryptoContext *aContext, uint8_t *aBuf, size_t aBufLength) in otPlatCryptoHmacSha256Finish() argument
281 if (aBuf == NULL || !checkContext(aContext, sizeof(psa_mac_operation_t))) { in otPlatCryptoHmacSha256Finish()
285 operation = aContext->mContext; in otPlatCryptoHmacSha256Finish()
290 otError otPlatCryptoAesInit(otCryptoContext *aContext) in otPlatCryptoAesInit() argument
294 if (!checkContext(aContext, sizeof(psa_key_id_t))) { in otPlatCryptoAesInit()
298 key_ref = aContext->mContext; in otPlatCryptoAesInit()
304 otError otPlatCryptoAesSetKey(otCryptoContext *aContext, const otCryptoKey *aKey) in otPlatCryptoAesSetKey() argument
308 if (aKey == NULL || !checkContext(aContext, sizeof(psa_key_id_t))) { in otPlatCryptoAesSetKey()
312 key_ref = aContext->mContext; in otPlatCryptoAesSetKey()
318 otError otPlatCryptoAesEncrypt(otCryptoContext *aContext, const uint8_t *aInput, uint8_t *aOutput) in otPlatCryptoAesEncrypt() argument
325 if (aInput == NULL || aOutput == NULL || !checkContext(aContext, sizeof(psa_key_id_t))) { in otPlatCryptoAesEncrypt()
329 key_ref = aContext->mContext; in otPlatCryptoAesEncrypt()
336 otError otPlatCryptoAesFree(otCryptoContext *aContext) in otPlatCryptoAesFree() argument
341 otError otPlatCryptoSha256Init(otCryptoContext *aContext) in otPlatCryptoSha256Init() argument
345 if (!checkContext(aContext, sizeof(psa_hash_operation_t))) { in otPlatCryptoSha256Init()
349 operation = aContext->mContext; in otPlatCryptoSha256Init()
355 otError otPlatCryptoSha256Deinit(otCryptoContext *aContext) in otPlatCryptoSha256Deinit() argument
359 if (!checkContext(aContext, sizeof(psa_hash_operation_t))) { in otPlatCryptoSha256Deinit()
363 operation = aContext->mContext; in otPlatCryptoSha256Deinit()
368 otError otPlatCryptoSha256Start(otCryptoContext *aContext) in otPlatCryptoSha256Start() argument
372 if (!checkContext(aContext, sizeof(psa_hash_operation_t))) { in otPlatCryptoSha256Start()
376 operation = aContext->mContext; in otPlatCryptoSha256Start()
381 otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, uint16_t aBufLength) in otPlatCryptoSha256Update() argument
385 if (aBuf == NULL || !checkContext(aContext, sizeof(psa_hash_operation_t))) { in otPlatCryptoSha256Update()
389 operation = aContext->mContext; in otPlatCryptoSha256Update()
394 otError otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize) in otPlatCryptoSha256Finish() argument
399 if (aHash == NULL || !checkContext(aContext, sizeof(psa_hash_operation_t))) { in otPlatCryptoSha256Finish()
403 operation = aContext->mContext; in otPlatCryptoSha256Finish()