summaryrefslogtreecommitdiffstats
path: root/crypto/evp/digest.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-02-02 00:45:54 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-02-02 00:45:54 +0000
commit88ce56f8c19afca84548ce85bbc9b5dda3c724f9 (patch)
tree3246395c2be795f28d84443d3a193efe6d3a96fb /crypto/evp/digest.c
parent664d83bb23e7e6d30b63f6127b454f7c6dc33da9 (diff)
Various function for commmon operations.
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;
+}