Lines Matching refs:hc
59 struct mbed_hash_ctx *hc = to_hash_ctx(ctx); in mbed_hash_final() local
60 size_t hash_size = mbedtls_md_get_size(hc->md_ctx.md_info); in mbed_hash_final()
75 if (mbedtls_md_finish(&hc->md_ctx, tmp_digest)) in mbed_hash_final()
86 struct mbed_hash_ctx *hc = to_hash_ctx(ctx); in mbed_hash_free_ctx() local
88 mbedtls_md_free(&hc->md_ctx); in mbed_hash_free_ctx()
89 free(hc); in mbed_hash_free_ctx()
114 struct mbed_hash_ctx *hc = NULL; in mbed_hash_alloc_ctx() local
120 hc = calloc(1, sizeof(*hc)); in mbed_hash_alloc_ctx()
121 if (!hc) in mbed_hash_alloc_ctx()
124 hc->hash_ctx.ops = &mbed_hash_ops; in mbed_hash_alloc_ctx()
125 mbed_res = mbedtls_md_setup(&hc->md_ctx, md_info, 0); in mbed_hash_alloc_ctx()
127 free(hc); in mbed_hash_alloc_ctx()
133 *ctx_ret = &hc->hash_ctx; in mbed_hash_alloc_ctx()