Lines Matching refs:digest_ctx

675 struct digest_ctx {  struct
749 struct digest_ctx *digest_ctx = in digest_init() local
750 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_init()
754 digest_ctx->init_called = 1; in digest_init()
756 memset(&digest_ctx->sess, 0, sizeof(digest_ctx->sess)); in digest_init()
757 digest_ctx->sess.mac = digest_d->devcryptoid; in digest_init()
758 if (ioctl(cfd, CIOCGSESSION, &digest_ctx->sess) < 0) { in digest_init()
765 static int digest_op(struct digest_ctx *ctx, const void *src, size_t srclen, in digest_op()
782 struct digest_ctx *digest_ctx = in digest_update() local
783 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_update()
788 if (digest_ctx == NULL) in digest_update()
792 if (digest_op(digest_ctx, data, count, digest_ctx->digest_res, 0) >= 0) in digest_update()
794 } else if (digest_op(digest_ctx, data, count, NULL, COP_FLAG_UPDATE) >= 0) { in digest_update()
804 struct digest_ctx *digest_ctx = in digest_final() local
805 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_final()
807 if (md == NULL || digest_ctx == NULL) in digest_final()
811 memcpy(md, digest_ctx->digest_res, EVP_MD_CTX_get_size(ctx)); in digest_final()
812 } else if (digest_op(digest_ctx, NULL, 0, md, COP_FLAG_FINAL) < 0) { in digest_final()
822 struct digest_ctx *digest_from = in digest_copy()
823 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(from); in digest_copy()
824 struct digest_ctx *digest_to = in digest_copy()
825 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(to); in digest_copy()
847 struct digest_ctx *digest_ctx = in digest_cleanup() local
848 (struct digest_ctx *)EVP_MD_CTX_get0_md_data(ctx); in digest_cleanup()
850 if (digest_ctx == NULL) in digest_cleanup()
853 return clean_devcrypto_session(&digest_ctx->sess); in digest_cleanup()
961 sizeof(struct digest_ctx))) { in prepare_digest_methods()