Lines Matching refs:hmac_ctx
63 static HMAC_CTX* hmac_ctx; variable
67 assert(!hmac_ctx); in crypt_init()
72 hmac_ctx = HMAC_CTX_new(); in crypt_init()
73 assert(hmac_ctx); in crypt_init()
80 HMAC_CTX_free(hmac_ctx); in crypt_shutdown()
81 hmac_ctx = NULL; in crypt_shutdown()
200 assert(hmac_ctx); in calculate_mac()
201 HMAC_CTX_reset(hmac_ctx); in calculate_mac()
203 hmac_ret = HMAC_Init_ex(hmac_ctx, key, sizeof(*key), EVP_sha256(), NULL); in calculate_mac()
209 hmac_ret = HMAC_Update(hmac_ctx, data, data_size); in calculate_mac()
215 hmac_ret = HMAC_Final(hmac_ctx, mac_buf, &md_len); in calculate_mac()