diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-02-02 00:45:54 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-02-02 00:45:54 +0000 |
commit | 88ce56f8c19afca84548ce85bbc9b5dda3c724f9 (patch) | |
tree | 3246395c2be795f28d84443d3a193efe6d3a96fb /crypto/evp/digest.c | |
parent | 664d83bb23e7e6d30b63f6127b454f7c6dc33da9 (diff) |
Various function for commmon operations.
Diffstat (limited to 'crypto/evp/digest.c')
-rw-r--r-- | crypto/evp/digest.c | 12 |
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; +} |