summaryrefslogtreecommitdiffstats
path: root/crypto/des/qud_cksm.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-08-03 21:58:56 +0000
committerRichard Levitte <levitte@openssl.org>2000-08-03 21:58:56 +0000
commit0a3f67e3b0d558d30ebf57ba4fafb299eef49398 (patch)
tree059635d78e43a0bc6be228956aee6188861be77c /crypto/des/qud_cksm.c
parentea58130d1af15cce09c67ab1ea0713010e3501fc (diff)
On Unicos, shorts are 8 bytes, so instead, use a structure with 2 32-bit ints, just as in destest.c
Diffstat (limited to 'crypto/des/qud_cksm.c')
-rw-r--r--crypto/des/qud_cksm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/crypto/des/qud_cksm.c b/crypto/des/qud_cksm.c
index 5f0ec5387f..9fff989edb 100644
--- a/crypto/des/qud_cksm.c
+++ b/crypto/des/qud_cksm.c
@@ -81,13 +81,17 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
long l;
const unsigned char *cp;
#ifdef _CRAY
- short *lp;
+ struct lp_st { int a:32; int b:32; } *lp;
#else
DES_LONG *lp;
#endif
if (out_count < 1) out_count=1;
+#ifdef _CRAY
+ lp = (struct lp_st *) &(output[0])[0];
+#else
lp = (DES_LONG *) &(output[0])[0];
+#endif
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]);
@@ -120,8 +124,14 @@ DES_LONG des_quad_cksum(const unsigned char *input, des_cblock output[],
{
/* The MIT library assumes that the checksum is
* composed of 2*out_count 32 bit ints */
+#ifdef _CRAY
+ (*lp).a = z0;
+ (*lp).b = z1;
+ lp++;
+#else
*lp++ = z0;
*lp++ = z1;
+#endif
}
}
return(z0);