summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ripemd/rmd_dgst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ripemd/rmd_dgst.c')
-rw-r--r--src/lib/libcrypto/ripemd/rmd_dgst.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/src/lib/libcrypto/ripemd/rmd_dgst.c b/src/lib/libcrypto/ripemd/rmd_dgst.c
index 210de1977d..b590856229 100644
--- a/src/lib/libcrypto/ripemd/rmd_dgst.c
+++ b/src/lib/libcrypto/ripemd/rmd_dgst.c
@@ -58,27 +58,17 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "rmd_locl.h" 60#include "rmd_locl.h"
61#include <openssl/opensslv.h>
61 62
62char *RMD160_version="RIPEMD160 part of SSLeay 0.9.0b 29-Jun-1998"; 63char *RMD160_version="RIPE-MD160" OPENSSL_VERSION_PTEXT;
63 64
64#ifndef NOPROTO
65# ifdef RMD160_ASM 65# ifdef RMD160_ASM
66 void ripemd160_block_x86(RIPEMD160_CTX *c, unsigned long *p,int num); 66 void ripemd160_block_x86(RIPEMD160_CTX *c, unsigned long *p,int num);
67# define ripemd160_block ripemd160_block_x86 67# define ripemd160_block ripemd160_block_x86
68# else 68# else
69 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,int num); 69 void ripemd160_block(RIPEMD160_CTX *c, unsigned long *p,int num);
70# endif 70# endif
71#else 71void RIPEMD160_Init(RIPEMD160_CTX *c)
72# ifdef RMD160_ASM
73 void ripemd160_block_x86();
74# define ripemd160_block ripemd160_block_x86
75# else
76 static void ripemd160_block();
77# endif
78#endif
79
80void RIPEMD160_Init(c)
81RIPEMD160_CTX *c;
82 { 72 {
83 c->A=RIPEMD160_A; 73 c->A=RIPEMD160_A;
84 c->B=RIPEMD160_B; 74 c->B=RIPEMD160_B;
@@ -90,10 +80,8 @@ RIPEMD160_CTX *c;
90 c->num=0; 80 c->num=0;
91 } 81 }
92 82
93void RIPEMD160_Update(c, data, len) 83void RIPEMD160_Update(RIPEMD160_CTX *c, register unsigned char *data,
94RIPEMD160_CTX *c; 84 unsigned long len)
95register unsigned char *data;
96unsigned long len;
97 { 85 {
98 register ULONG *p; 86 register ULONG *p;
99 int sw,sc; 87 int sw,sc;
@@ -221,9 +209,7 @@ unsigned long len;
221 } 209 }
222 } 210 }
223 211
224void RIPEMD160_Transform(c,b) 212void RIPEMD160_Transform(RIPEMD160_CTX *c, unsigned char *b)
225RIPEMD160_CTX *c;
226unsigned char *b;
227 { 213 {
228 ULONG p[16]; 214 ULONG p[16];
229#if !defined(L_ENDIAN) 215#if !defined(L_ENDIAN)
@@ -260,10 +246,7 @@ unsigned char *b;
260 246
261#ifndef RMD160_ASM 247#ifndef RMD160_ASM
262 248
263void ripemd160_block(ctx, X, num) 249void ripemd160_block(RIPEMD160_CTX *ctx, register ULONG *X, int num)
264RIPEMD160_CTX *ctx;
265register ULONG *X;
266int num;
267 { 250 {
268 register ULONG A,B,C,D,E; 251 register ULONG A,B,C,D,E;
269 ULONG a,b,c,d,e; 252 ULONG a,b,c,d,e;
@@ -460,9 +443,7 @@ int num;
460 } 443 }
461#endif 444#endif
462 445
463void RIPEMD160_Final(md, c) 446void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c)
464unsigned char *md;
465RIPEMD160_CTX *c;
466 { 447 {
467 register int i,j; 448 register int i,j;
468 register ULONG l; 449 register ULONG l;
@@ -518,8 +499,7 @@ RIPEMD160_CTX *c;
518 } 499 }
519 500
520#ifdef undef 501#ifdef undef
521int printit(l) 502int printit(unsigned long *l)
522unsigned long *l;
523 { 503 {
524 int i,ii; 504 int i,ii;
525 505