summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/m_ripemd.c
diff options
context:
space:
mode:
authorbeck <>2002-05-15 02:29:21 +0000
committerbeck <>2002-05-15 02:29:21 +0000
commitb64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch)
treefa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/evp/m_ripemd.c
parente471e1ea98d673597b182ea85f29e30c97cd08b5 (diff)
downloadopenbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/evp/m_ripemd.c')
-rw-r--r--src/lib/libcrypto/evp/m_ripemd.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/lib/libcrypto/evp/m_ripemd.c b/src/lib/libcrypto/evp/m_ripemd.c
index 3d781a4e8d..64725528dc 100644
--- a/src/lib/libcrypto/evp/m_ripemd.c
+++ b/src/lib/libcrypto/evp/m_ripemd.c
@@ -56,7 +56,7 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef NO_RIPEMD 59#ifndef OPENSSL_NO_RIPEMD
60#include <stdio.h> 60#include <stdio.h>
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include <openssl/ripemd.h> 62#include <openssl/ripemd.h>
@@ -64,20 +64,32 @@
64#include <openssl/objects.h> 64#include <openssl/objects.h>
65#include <openssl/x509.h> 65#include <openssl/x509.h>
66 66
67static EVP_MD ripemd160_md= 67static int init(EVP_MD_CTX *ctx)
68 { return RIPEMD160_Init(ctx->md_data); }
69
70static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count)
71 { return RIPEMD160_Update(ctx->md_data,data,count); }
72
73static int final(EVP_MD_CTX *ctx,unsigned char *md)
74 { return RIPEMD160_Final(md,ctx->md_data); }
75
76static const EVP_MD ripemd160_md=
68 { 77 {
69 NID_ripemd160, 78 NID_ripemd160,
70 NID_ripemd160WithRSA, 79 NID_ripemd160WithRSA,
71 RIPEMD160_DIGEST_LENGTH, 80 RIPEMD160_DIGEST_LENGTH,
72 RIPEMD160_Init, 81 0,
73 RIPEMD160_Update, 82 init,
74 RIPEMD160_Final, 83 update,
84 final,
85 NULL,
86 NULL,
75 EVP_PKEY_RSA_method, 87 EVP_PKEY_RSA_method,
76 RIPEMD160_CBLOCK, 88 RIPEMD160_CBLOCK,
77 sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX), 89 sizeof(EVP_MD *)+sizeof(RIPEMD160_CTX),
78 }; 90 };
79 91
80EVP_MD *EVP_ripemd160(void) 92const EVP_MD *EVP_ripemd160(void)
81 { 93 {
82 return(&ripemd160_md); 94 return(&ripemd160_md);
83 } 95 }