Lines Matching refs:digest
1 /* crypto/evp/digest.c */
167 if (ctx->engine && ctx->digest && (!type ||
170 ctx->digest->type))))
197 /* We'll use the ENGINE's private digest definition */
207 if (!ctx->digest) {
211 type = ctx->digest;
214 if (ctx->digest != type) {
215 if (ctx->digest && ctx->digest->ctx_size)
217 ctx->digest = type;
248 return ctx->digest->init(ctx);
277 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
278 ret = ctx->digest->final(ctx, md);
280 *size = ctx->digest->md_size;
281 if (ctx->digest->cleanup) {
282 ctx->digest->cleanup(ctx);
285 memset(ctx->md_data, 0, ctx->digest->ctx_size);
299 if ((in == NULL) || (in->digest == NULL)) {
304 /* Make sure it's safe to copy a digest context using an ENGINE */
311 if (out->digest == in->digest) {
319 if (in->md_data && out->digest->ctx_size) {
323 out->md_data = OPENSSL_malloc(out->digest->ctx_size);
329 memcpy(out->md_data, in->md_data, out->digest->ctx_size);
342 if (out->digest->copy)
343 return out->digest->copy(out, in);
381 if (ctx->digest && ctx->digest->cleanup
383 ctx->digest->cleanup(ctx);
384 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
386 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);