Clean up code.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1582 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-04-13 22:22:38 +00:00
parent e4c71731c2
commit 88a91cc535

View File

@@ -73,10 +73,10 @@ des_cblock (*seed);
int i;
long l=0;
unsigned char *cp;
unsigned char *lp;
DES_LONG *lp;
if (out_count < 1) out_count=1;
lp=(unsigned char *)output;
lp=(DES_LONG*)output;
z0=B0((*seed)[0])|B1((*seed)[1])|B2((*seed)[2])|B3((*seed)[3]);
z1=B0((*seed)[4])|B1((*seed)[5])|B2((*seed)[6])|B3((*seed)[7]);
@@ -107,30 +107,10 @@ des_cblock (*seed);
}
if (lp != NULL)
{
/* I believe I finally have things worked out.
* The MIT library assumes that the checksum
* is one huge number and it is returned in a
* host dependant byte order.
*/
static DES_LONG ltmp=1;
static unsigned char *c=(unsigned char *)&ltmp;
if (c[0])
{
l2c(z0,lp);
l2c(z1,lp);
}
else
{
#if 0
lp=output[out_count-i-1];
l2n(z1,lp);
l2n(z0,lp);
#else
l2n(z0,lp);
l2n(z1,lp);
#endif
}
/* The MIT library assumes that the checksum is
* composed of 2*out_count 32 bit ints */
*lp++ = z0;
*lp++ = z1;
}
}
return(z0);