libmd: ansify

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Mateusz Guzik 2023-03-16 19:02:56 +00:00
parent ba5070ab44
commit b38688df1d
3 changed files with 16 additions and 50 deletions

View File

@ -88,8 +88,7 @@ void ripemd160_block_x86(RIPEMD160_CTX *c, const u_int32_t *p,int num);
void ripemd160_block(RIPEMD160_CTX *c, const u_int32_t *p,int num);
#endif
void RIPEMD160_Init(c)
RIPEMD160_CTX *c;
void RIPEMD160_Init(RIPEMD160_CTX *c)
{
c->A=RIPEMD160_A;
c->B=RIPEMD160_B;
@ -101,10 +100,7 @@ RIPEMD160_CTX *c;
c->num=0;
}
void RIPEMD160_Update(c, in, len)
RIPEMD160_CTX *c;
const void *in;
size_t len;
void RIPEMD160_Update(RIPEMD160_CTX *c, const void *in, size_t len)
{
u_int32_t *p;
int sw,sc;
@ -233,9 +229,7 @@ size_t len;
}
}
void RIPEMD160_Transform(c,b)
RIPEMD160_CTX *c;
unsigned char *b;
void RIPEMD160_Transform(RIPEMD160_CTX *c, unsigned char *b)
{
u_int32_t p[16];
#if BYTE_ORDER != LITTLE_ENDIAN
@ -272,10 +266,7 @@ unsigned char *b;
#ifndef RMD160_ASM
void ripemd160_block(ctx, X, num)
RIPEMD160_CTX *ctx;
const u_int32_t *X;
int num;
void ripemd160_block(RIPEMD160_CTX *ctx, const u_int32_t *X, int num)
{
u_int32_t A,B,C,D,E;
u_int32_t a,b,c,d,e;
@ -472,9 +463,7 @@ int num;
}
#endif
void RIPEMD160_Final(md, c)
unsigned char *md;
RIPEMD160_CTX *c;
void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c)
{
int i,j;
u_int32_t l;
@ -528,8 +517,7 @@ RIPEMD160_CTX *c;
}
#ifdef undef
int printit(l)
unsigned long *l;
int printit(unsigned long *l)
{
int i,ii;

View File

@ -102,8 +102,7 @@ char *SHA_version="SHA part of SSLeay 0.9.0b 11-Oct-1998";
#define M_p_c2nl_p p_c2nl_p
#define M_nl2c nl2c
void SHA_Init(c)
SHA_CTX *c;
void SHA_Init(SHA_CTX *c)
{
c->h0=INIT_DATA_h0;
c->h1=INIT_DATA_h1;
@ -115,10 +114,7 @@ SHA_CTX *c;
c->num=0;
}
void SHA_Update(c, in, len)
SHA_CTX *c;
const void *in;
size_t len;
void SHA_Update(SHA_CTX *c, const void *in, size_t len)
{
u_int32_t *p;
int ew,ec,sw,sc;
@ -249,9 +245,7 @@ size_t len;
p[sw]=l;
}
void SHA_Transform(c,b)
SHA_CTX *c;
unsigned char *b;
void SHA_Transform(SHA_CTX *c, unsigned char *b)
{
u_int32_t p[16];
#if BYTE_ORDER == LITTLE_ENDIAN
@ -286,10 +280,7 @@ unsigned char *b;
sha_block(c,p,64);
}
void sha_block(c, W, num)
SHA_CTX *c;
const u_int32_t *W;
int num;
void sha_block(SHA_CTX *c, const u_int32_t *W, int num)
{
u_int32_t A,B,C,D,E,T;
u_int32_t X[16];
@ -405,9 +396,7 @@ int num;
}
}
void SHA_Final(md, c)
unsigned char *md;
SHA_CTX *c;
void SHA_Final(unsigned char *md, SHA_CTX *c)
{
int i,j;
u_int32_t l;

View File

@ -129,8 +129,7 @@ char *SHA1_version="SHA1 part of SSLeay 0.9.0b 11-Oct-1998";
# define M_nl2c nl2c
#endif
void SHA1_Init(c)
SHA_CTX *c;
void SHA1_Init(SHA_CTX *c)
{
c->h0=INIT_DATA_h0;
c->h1=INIT_DATA_h1;
@ -143,10 +142,7 @@ SHA_CTX *c;
}
void
SHA1_Update(c, in, len)
SHA_CTX *c;
const void *in;
size_t len;
SHA1_Update(SHA_CTX *c, const void *in, size_t len)
{
u_int32_t *p;
int ew,ec,sw,sc;
@ -277,9 +273,7 @@ SHA1_Update(c, in, len)
p[sw]=l;
}
void SHA1_Transform(c,b)
SHA_CTX *c;
unsigned char *b;
void SHA1_Transform(SHA_CTX *c, unsigned char *b)
{
u_int32_t p[16];
#if BYTE_ORDER != BIG_ENDIAN
@ -317,10 +311,7 @@ unsigned char *b;
#ifndef SHA1_ASM
void
sha1_block(c, W, num)
SHA_CTX *c;
const u_int32_t *W;
int num;
sha1_block(SHA_CTX *c, const u_int32_t *W, int num)
{
u_int32_t A,B,C,D,E,T;
u_int32_t X[16];
@ -437,9 +428,7 @@ sha1_block(c, W, num)
}
#endif
void SHA1_Final(md, c)
unsigned char *md;
SHA_CTX *c;
void SHA1_Final(unsigned char *md, SHA_CTX *c)
{
int i,j;
u_int32_t l;