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) {
219 ctx->digest = type;
250 return ctx->digest->init(ctx);
279 OPENSSL_assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
280 ret = ctx->digest->final(ctx, md);
282 *size = ctx->digest->md_size;
283 if (ctx->digest->cleanup) {
284 ctx->digest->cleanup(ctx);
287 memset(ctx->md_data, 0, ctx->digest->ctx_size);
301 if ((in == NULL) || (in->digest == NULL)) {
306 /* Make sure it's safe to copy a digest context using an ENGINE */
313 if (out->digest == in->digest) {
321 if (in->md_data && out->digest->ctx_size) {
325 out->md_data = OPENSSL_malloc(out->digest->ctx_size);
331 memcpy(out->md_data, in->md_data, out->digest->ctx_size);
344 if (out->digest->copy)
345 return out->digest->copy(out, in);
383 if (ctx->digest && ctx->digest->cleanup
385 ctx->digest->cleanup(ctx);
386 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data
388 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);