Minor 64-bit md32_common.h update and minor unsignification of digests.

This commit is contained in:
Andy Polyakov 2004-07-25 19:10:43 +00:00
parent c88f8f76b5
commit 16ab8a93bc
7 changed files with 10 additions and 9 deletions

View File

@ -73,7 +73,7 @@ extern "C" {
typedef struct MD2state_st
{
int num;
usigned int num;
unsigned char data[MD2_BLOCK];
MD2_INT cksm[MD2_BLOCK];
MD2_INT state[MD2_BLOCK];

View File

@ -77,7 +77,7 @@
* ...
* HASH_LONG Nl,Nh;
* HASH_LONG data[HASH_LBLOCK];
* int num;
* unsigned int num;
* ...
* } HASH_CTX;
* HASH_UPDATE
@ -398,7 +398,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len)
const unsigned char *data=data_;
register HASH_LONG * p;
register HASH_LONG l;
unsigned int sw,sc,ew,ec;
size_t sw,sc,ew,ec;
if (len==0) return 1;
@ -430,7 +430,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len)
}
else
{
c->num+=len;
c->num+=(unsigned int)len;
if ((sc+len) < 4) /* ugly, add char's to a word */
{
l=p[sw]; HOST_p_c2l_p(data,l,sc,len); p[sw]=l;

View File

@ -101,7 +101,7 @@ typedef struct MD4state_st
MD4_LONG A,B,C,D;
MD4_LONG Nl,Nh;
MD4_LONG data[MD4_LBLOCK];
int num;
unsigned int num;
} MD4_CTX;
int MD4_Init(MD4_CTX *c);

View File

@ -101,7 +101,7 @@ typedef struct MD5state_st
MD5_LONG A,B,C,D;
MD5_LONG Nl,Nh;
MD5_LONG data[MD5_LBLOCK];
int num;
unigned int num;
} MD5_CTX;
int MD5_Init(MD5_CTX *c);

View File

@ -74,7 +74,7 @@ extern "C" {
typedef struct mdc2_ctx_st
{
int num;
unsigned int num;
unsigned char data[MDC2_BLOCK];
DES_cblock h,hh;
int pad_type; /* either 1 or 2, default 1 */

View File

@ -160,7 +160,8 @@ static void mdc2_body(MDC2_CTX *c, const unsigned char *in, size_t len)
int MDC2_Final(unsigned char *md, MDC2_CTX *c)
{
int i,j;
unsigned int i;
int j;
i=c->num;
j=c->pad_type;

View File

@ -87,7 +87,7 @@ typedef struct RIPEMD160state_st
RIPEMD160_LONG A,B,C,D,E;
RIPEMD160_LONG Nl,Nh;
RIPEMD160_LONG data[RIPEMD160_LBLOCK];
int num;
unsigned int num;
} RIPEMD160_CTX;
int RIPEMD160_Init(RIPEMD160_CTX *c);