Lines Matching refs:digest
1 /* crypto/evp/digest.c */
148 if (ctx->engine && ctx->digest && (!type ||
149 (type && (type->type == ctx->digest->type))))
179 /* We'll use the ENGINE's private digest definition */
190 if(!ctx->digest)
196 if (ctx->digest != type)
198 if (ctx->digest && ctx->digest->ctx_size)
200 ctx->digest=type;
207 return ctx->digest->init(ctx);
213 return ctx->digest->update(ctx,data,count);
230 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
231 ret=ctx->digest->final(ctx,md);
233 *size=ctx->digest->md_size;
234 if (ctx->digest->cleanup)
236 ctx->digest->cleanup(ctx);
239 memset(ctx->md_data,0,ctx->digest->ctx_size);
252 if ((in == NULL) || (in->digest == NULL))
258 /* Make sure it's safe to copy a digest context using an ENGINE */
266 if (out->digest == in->digest)
275 if (out->digest->ctx_size)
278 else out->md_data=OPENSSL_malloc(out->digest->ctx_size);
279 memcpy(out->md_data,in->md_data,out->digest->ctx_size);
282 if (out->digest->copy)
283 return out->digest->copy(out,in);
316 if (ctx->digest && ctx->digest->cleanup
318 ctx->digest->cleanup(ctx);
319 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
322 OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size);