Get rid of casts.
This commit is contained in:
parent
62bad77124
commit
ac7d07851c
4 changed files with 10 additions and 9 deletions
|
@ -468,7 +468,7 @@ void HASH_UPDATE (HASH_CTX *c, const unsigned char *data, unsigned long len)
|
|||
*/
|
||||
if ((((unsigned long)data)%4) == 0)
|
||||
{
|
||||
HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,sw);
|
||||
HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,sw);
|
||||
sw*=HASH_CBLOCK;
|
||||
data+=sw;
|
||||
len-=sw;
|
||||
|
@ -510,11 +510,11 @@ void HASH_UPDATE (HASH_CTX *c, const unsigned char *data, unsigned long len)
|
|||
}
|
||||
|
||||
|
||||
void HASH_TRANSFORM (HASH_CTX *c, unsigned char *data)
|
||||
void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data)
|
||||
{
|
||||
#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED) && HASH_BLOCK_DATA_ORDER_ALIGNED!=1
|
||||
if ((((unsigned long)data)%4) == 0)
|
||||
HASH_BLOCK_DATA_ORDER_ALIGNED (c,(HASH_LONG *)data,1);
|
||||
HASH_BLOCK_DATA_ORDER_ALIGNED (c,data,1);
|
||||
else
|
||||
#if !defined(HASH_BLOCK_DATA_ORDER)
|
||||
{
|
||||
|
|
|
@ -106,7 +106,7 @@ void MD5_Init(MD5_CTX *c);
|
|||
void MD5_Update(MD5_CTX *c, const unsigned char *data, unsigned long len);
|
||||
void MD5_Final(unsigned char *md, MD5_CTX *c);
|
||||
unsigned char *MD5(unsigned char *d, unsigned long n, unsigned char *md);
|
||||
void MD5_Transform(MD5_CTX *c, unsigned char *b);
|
||||
void MD5_Transform(MD5_CTX *c, const unsigned char *b);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -82,8 +82,9 @@ void MD5_Init(MD5_CTX *c)
|
|||
}
|
||||
|
||||
#ifndef md5_block_host_order
|
||||
void md5_block_host_order (MD5_CTX *c, const MD5_LONG *X, int num)
|
||||
void md5_block_host_order (MD5_CTX *c, const void *data, int num)
|
||||
{
|
||||
const MD5_LONG *X=data;
|
||||
register unsigned long A,B,C,D;
|
||||
/*
|
||||
* In case you wonder why A-D are declared as long and not
|
||||
|
@ -185,7 +186,7 @@ void md5_block_host_order (MD5_CTX *c, const MD5_LONG *X, int num)
|
|||
#endif
|
||||
|
||||
#ifndef md5_block_data_order
|
||||
void md5_block_data_order (MD5_CTX *c, const unsigned char *data, int num)
|
||||
void md5_block_data_order (MD5_CTX *c, const void *data, int num)
|
||||
{
|
||||
register unsigned long A,B,C,D,l;
|
||||
/*
|
||||
|
|
|
@ -73,8 +73,8 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
void md5_block_host_order (MD5_CTX *c, const MD5_LONG *p,int num);
|
||||
void md5_block_data_order (MD5_CTX *c, const unsigned char *p,int num);
|
||||
void md5_block_host_order (MD5_CTX *c, const void *p,int num);
|
||||
void md5_block_data_order (MD5_CTX *c, const void *p,int num);
|
||||
|
||||
#if defined(__i386)
|
||||
/*
|
||||
|
@ -98,7 +98,7 @@ void md5_block_data_order (MD5_CTX *c, const unsigned char *p,int num);
|
|||
*
|
||||
* <appro@fy.chalmers.se>
|
||||
*/
|
||||
#define md5_block_data_order(c,p,num) md5_block_host_order((c),(const MD5_LONG *)(p),(num))
|
||||
#define md5_block_data_order md5_block_host_order
|
||||
#endif
|
||||
|
||||
#define DATA_ORDER_IS_LITTLE_ENDIAN
|
||||
|
|
Loading…
Reference in a new issue