mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
On Unicos, shorts are 8 bytes, so instead, use a structure with 2 32-bit ints, just as in destest.c
This commit is contained in:
parent
ea58130d1a
commit
0a3f67e3b0
@ -81,13 +81,17 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
|
|||||||
long l;
|
long l;
|
||||||
const unsigned char *cp;
|
const unsigned char *cp;
|
||||||
#ifdef _CRAY
|
#ifdef _CRAY
|
||||||
short *lp;
|
struct lp_st { int a:32; int b:32; } *lp;
|
||||||
#else
|
#else
|
||||||
DES_LONG *lp;
|
DES_LONG *lp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (out_count < 1) out_count=1;
|
if (out_count < 1) out_count=1;
|
||||||
|
#ifdef _CRAY
|
||||||
|
lp = (struct lp_st *) &(output[0])[0];
|
||||||
|
#else
|
||||||
lp = (DES_LONG *) &(output[0])[0];
|
lp = (DES_LONG *) &(output[0])[0];
|
||||||
|
#endif
|
||||||
|
|
||||||
z0=Q_B0((*seed)[0])|Q_B1((*seed)[1])|Q_B2((*seed)[2])|Q_B3((*seed)[3]);
|
z0=Q_B0((*seed)[0])|Q_B1((*seed)[1])|Q_B2((*seed)[2])|Q_B3((*seed)[3]);
|
||||||
z1=Q_B0((*seed)[4])|Q_B1((*seed)[5])|Q_B2((*seed)[6])|Q_B3((*seed)[7]);
|
z1=Q_B0((*seed)[4])|Q_B1((*seed)[5])|Q_B2((*seed)[6])|Q_B3((*seed)[7]);
|
||||||
@ -120,8 +124,14 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
|
|||||||
{
|
{
|
||||||
/* The MIT library assumes that the checksum is
|
/* The MIT library assumes that the checksum is
|
||||||
* composed of 2*out_count 32 bit ints */
|
* composed of 2*out_count 32 bit ints */
|
||||||
|
#ifdef _CRAY
|
||||||
|
(*lp).a = z0;
|
||||||
|
(*lp).b = z1;
|
||||||
|
lp++;
|
||||||
|
#else
|
||||||
*lp++ = z0;
|
*lp++ = z0;
|
||||||
*lp++ = z1;
|
*lp++ = z1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(z0);
|
return(z0);
|
||||||
|
Loading…
Reference in New Issue
Block a user