diff options
Diffstat (limited to 'crypto/mdc2')
-rw-r--r-- | crypto/mdc2/mdc2dgst.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/mdc2/mdc2dgst.c b/crypto/mdc2/mdc2dgst.c index 2a086c0612..72a0c76324 100644 --- a/crypto/mdc2/mdc2dgst.c +++ b/crypto/mdc2/mdc2dgst.c @@ -135,35 +135,35 @@ unsigned int len; register DES_LONG tin0,tin1; register DES_LONG ttin0,ttin1; DES_LONG d[2],dd[2]; - des_cblock *h,*hh; + unsigned char *h,*hh; des_key_schedule k; unsigned char *p; unsigned int i; - h= (des_cblock *)&(c->h[0]); - hh= (des_cblock *)&(c->hh[0]); + h= c->h; + hh= c->hh; for (i=0; i<len; i+=8) { c2l(in,tin0); d[0]=dd[0]=tin0; c2l(in,tin1); d[1]=dd[1]=tin1; - (*h)[0]=((*h)[0]&0x9f)|0x40; - (*hh)[0]=((*hh)[0]&0x9f)|0x20; + h[0]=(h[0]&0x9f)|0x40; + hh[0]=(hh[0]&0x9f)|0x20; des_set_odd_parity(h); des_set_key(h,k); - des_encrypt((DES_LONG *)d,k,1); + des_encrypt(d,k,1); des_set_odd_parity(hh); des_set_key(hh,k); - des_encrypt((DES_LONG *)dd,k,1); + des_encrypt(dd,k,1); ttin0=tin0^dd[0]; ttin1=tin1^dd[1]; tin0^=d[0]; tin1^=d[1]; - p=(unsigned char *)h; + p=h; l2c(tin0,p); l2c(ttin1,p); p=(unsigned char *)hh; |