Lines Matching refs:digest
57 #include <openssl/digest.h>
91 if (ctx->digest && ctx->digest->ctx_size && ctx->md_data) {
92 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
118 if (in == NULL || in->digest == NULL) {
119 OPENSSL_PUT_ERROR(DIGEST, DIGEST_R_INPUT_NOT_INITIALIZED);
123 if (out->digest == in->digest) {
133 out->digest = in->digest;
134 if (in->md_data && in->digest->ctx_size) {
138 out->md_data = OPENSSL_malloc(in->digest->ctx_size);
140 OPENSSL_PUT_ERROR(DIGEST, ERR_R_MALLOC_FAILURE);
144 memcpy(out->md_data, in->md_data, in->digest->ctx_size);
166 if (ctx->digest != type) {
167 if (ctx->digest && ctx->digest->ctx_size > 0) {
170 ctx->digest = type;
174 OPENSSL_PUT_ERROR(DIGEST, ERR_R_MALLOC_FAILURE);
182 ctx->digest->init(ctx);
192 ctx->digest->update(ctx, data, len);
197 assert(ctx->digest->md_size <= EVP_MAX_MD_SIZE);
198 ctx->digest->final(ctx, md_out);
200 *size = ctx->digest->md_size;
202 OPENSSL_cleanse(ctx->md_data, ctx->digest->ctx_size);
231 return ctx->digest;
246 int EVP_add_digest(const EVP_MD *digest) {