Lines Matching refs:digest
28 if (ctx->digest && ctx->digest->cleanup in EVP_MD_CTX_reset()
30 ctx->digest->cleanup(ctx); in EVP_MD_CTX_reset()
31 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data in EVP_MD_CTX_reset()
33 OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size); in EVP_MD_CTX_reset()
76 if (ctx->engine && ctx->digest && in EVP_DigestInit_ex()
77 (type == NULL || (type->type == ctx->digest->type))) in EVP_DigestInit_ex()
114 if (!ctx->digest) { in EVP_DigestInit_ex()
118 type = ctx->digest; in EVP_DigestInit_ex()
121 if (ctx->digest != type) { in EVP_DigestInit_ex()
122 if (ctx->digest && ctx->digest->ctx_size) { in EVP_DigestInit_ex()
123 OPENSSL_clear_free(ctx->md_data, ctx->digest->ctx_size); in EVP_DigestInit_ex()
126 ctx->digest = type; in EVP_DigestInit_ex()
148 return ctx->digest->init(ctx); in EVP_DigestInit_ex()
173 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE); in EVP_DigestFinal_ex()
174 ret = ctx->digest->final(ctx, md); in EVP_DigestFinal_ex()
176 *size = ctx->digest->md_size; in EVP_DigestFinal_ex()
177 if (ctx->digest->cleanup) { in EVP_DigestFinal_ex()
178 ctx->digest->cleanup(ctx); in EVP_DigestFinal_ex()
181 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size); in EVP_DigestFinal_ex()
189 if (ctx->digest->flags & EVP_MD_FLAG_XOF in EVP_DigestFinalXOF()
191 && ctx->digest->md_ctrl(ctx, EVP_MD_CTRL_XOF_LEN, (int)size, NULL)) { in EVP_DigestFinalXOF()
192 ret = ctx->digest->final(ctx, md); in EVP_DigestFinalXOF()
194 if (ctx->digest->cleanup != NULL) { in EVP_DigestFinalXOF()
195 ctx->digest->cleanup(ctx); in EVP_DigestFinalXOF()
198 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size); in EVP_DigestFinalXOF()
215 if ((in == NULL) || (in->digest == NULL)) { in EVP_MD_CTX_copy_ex()
227 if (out->digest == in->digest) { in EVP_MD_CTX_copy_ex()
245 if (in->md_data && out->digest->ctx_size) { in EVP_MD_CTX_copy_ex()
249 out->md_data = OPENSSL_malloc(out->digest->ctx_size); in EVP_MD_CTX_copy_ex()
255 memcpy(out->md_data, in->md_data, out->digest->ctx_size); in EVP_MD_CTX_copy_ex()
268 if (out->digest->copy) in EVP_MD_CTX_copy_ex()
269 return out->digest->copy(out, in); in EVP_MD_CTX_copy_ex()
294 if (ctx->digest && ctx->digest->md_ctrl) { in EVP_MD_CTX_ctrl()
295 int ret = ctx->digest->md_ctrl(ctx, cmd, p1, p2); in EVP_MD_CTX_ctrl()