Lines Matching refs:hc
59 struct mbed_hash_ctx *hc = to_hash_ctx(ctx); in mbed_hash_final() local
67 hash_size = mbedtls_md_get_size(mbedtls_md_info_from_ctx(&hc->md_ctx)); in mbed_hash_final()
76 if (mbedtls_md_finish(&hc->md_ctx, tmp_digest)) in mbed_hash_final()
87 struct mbed_hash_ctx *hc = to_hash_ctx(ctx); in mbed_hash_free_ctx() local
89 mbedtls_md_free(&hc->md_ctx); in mbed_hash_free_ctx()
90 free(hc); in mbed_hash_free_ctx()
115 struct mbed_hash_ctx *hc = NULL; in mbed_hash_alloc_ctx() local
121 hc = calloc(1, sizeof(*hc)); in mbed_hash_alloc_ctx()
122 if (!hc) in mbed_hash_alloc_ctx()
125 hc->hash_ctx.ops = &mbed_hash_ops; in mbed_hash_alloc_ctx()
126 mbed_res = mbedtls_md_setup(&hc->md_ctx, md_info, 0); in mbed_hash_alloc_ctx()
128 free(hc); in mbed_hash_alloc_ctx()
134 *ctx_ret = &hc->hash_ctx; in mbed_hash_alloc_ctx()