summaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r--crypto/evp/digest.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index c560733568..5c75a347b8 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -89,4 +89,14 @@ int EVP_MD_CTX_copy(EVP_MD_CTX *out, EVP_MD_CTX *in)
}
memcpy((char *)out,(char *)in,in->digest->ctx_size);
return 1;
-}
+}
+
+int EVP_Digest(void *data, unsigned int count,
+ unsigned char *md, unsigned int *size, const EVP_MD *type)
+{
+ EVP_MD_CTX ctx;
+ EVP_DigestInit(&ctx, type);
+ EVP_DigestUpdate(&ctx, data, count);
+ EVP_DigestFinal(&ctx, md, size);
+ return 1;
+}