Lines Matching defs:aesContext
89 mbedtls_gcm_context aesContext;
90 mbedtls_gcm_init(&aesContext);
92 ret = mbedtls_gcm_setkey(&aesContext, MBEDTLS_CIPHER_ID_AES, cipherKey->key, cipherKey->keyLen * KEY_BITS_UNIT);
94 mbedtls_gcm_free(&aesContext);
98 ret = mbedtls_gcm_crypt_and_tag(&aesContext, MBEDTLS_GCM_ENCRYPT, plainTextSize, cipherKey->iv, GCM_IV_LEN, NULL, 0,
101 mbedtls_gcm_free(&aesContext);
106 mbedtls_gcm_free(&aesContext);
112 mbedtls_gcm_free(&aesContext);
116 mbedtls_gcm_free(&aesContext);
129 mbedtls_gcm_context aesContext;
130 mbedtls_gcm_init(&aesContext);
132 mbedtls_gcm_setkey(&aesContext, MBEDTLS_CIPHER_ID_AES, cipherKey->key, cipherKey->keyLen * KEY_BITS_UNIT);
135 mbedtls_gcm_free(&aesContext);
140 ret = mbedtls_gcm_auth_decrypt(&aesContext, cipherTextSize - OVERHEAD_LEN, cipherKey->iv, GCM_IV_LEN, NULL, 0,
144 mbedtls_gcm_free(&aesContext);
148 mbedtls_gcm_free(&aesContext);