diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-05-07 04:51:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:39 -0500 |
commit | 835926c87921a0f4186a9331b6e31b2e6f1c0d90 (patch) | |
tree | 1086d806019f4f7a86dc7b0073017a0fb876b6c2 /source4/heimdal/lib/des/sha.c | |
parent | 7a0b65efce3669643d21a2e209d4bf2626a5e948 (diff) | |
download | samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.gz samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.bz2 samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.zip |
r15481: Update heimdal/ to match current lorikeet-heimdal.
This includes many useful upstream changes, many of which should
reduce warnings in our compile.
It also includes a change to the HDB interface, which removes the need
for Samba4/lorikeet-heimdal to deviate from upstream for hdb_fetch().
The new flags replace the old entry type enum.
(This required the rework in hdb-ldb.c included in this commit)
Andrew Bartlett
(This used to be commit ef5604b87744c89e66e4d845f45b23563754ec05)
Diffstat (limited to 'source4/heimdal/lib/des/sha.c')
-rw-r--r-- | source4/heimdal/lib/des/sha.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source4/heimdal/lib/des/sha.c b/source4/heimdal/lib/des/sha.c index ca6c1c16d4..fae0fe01cb 100644 --- a/source4/heimdal/lib/des/sha.c +++ b/source4/heimdal/lib/des/sha.c @@ -34,7 +34,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" -RCSID("$Id: sha.c,v 1.18 2005/04/27 11:55:05 lha Exp $"); +RCSID("$Id: sha.c,v 1.19 2006/05/05 10:25:00 lha Exp $"); #endif #include "hash.h" @@ -72,7 +72,7 @@ SHA1_Init (struct sha *m) #define DO(t,f,k) \ do { \ - u_int32_t temp; \ + uint32_t temp; \ \ temp = cshift(AA, 5) + f(BB,CC,DD) + EE + data[t] + k; \ EE = DD; \ @@ -83,10 +83,10 @@ do { \ } while(0) static inline void -calc (struct sha *m, u_int32_t *in) +calc (struct sha *m, uint32_t *in) { - u_int32_t AA, BB, CC, DD, EE; - u_int32_t data[80]; + uint32_t AA, BB, CC, DD, EE; + uint32_t data[80]; int i; AA = A; @@ -204,11 +204,11 @@ calc (struct sha *m, u_int32_t *in) */ #if !defined(WORDS_BIGENDIAN) || defined(_CRAY) -static inline u_int32_t -swap_u_int32_t (u_int32_t t) +static inline uint32_t +swap_uint32_t (uint32_t t) { #define ROL(x,n) ((x)<<(n))|((x)>>(32-(n))) - u_int32_t temp1, temp2; + uint32_t temp1, temp2; temp1 = cshift(t, 16); temp2 = temp1 >> 8; @@ -244,15 +244,15 @@ SHA1_Update (struct sha *m, const void *v, size_t len) if(offset == 64){ #if !defined(WORDS_BIGENDIAN) || defined(_CRAY) int i; - u_int32_t current[16]; + uint32_t current[16]; struct x32 *u = (struct x32*)m->save; for(i = 0; i < 8; i++){ - current[2*i+0] = swap_u_int32_t(u[i].a); - current[2*i+1] = swap_u_int32_t(u[i].b); + current[2*i+0] = swap_uint32_t(u[i].a); + current[2*i+1] = swap_uint32_t(u[i].b); } calc(m, current); #else - calc(m, (u_int32_t*)m->save); + calc(m, (uint32_t*)m->save); #endif offset = 0; } @@ -291,10 +291,10 @@ SHA1_Final (void *res, struct sha *m) #if 0 { int i; - u_int32_t *r = (u_int32_t *)res; + uint32_t *r = (uint32_t *)res; for (i = 0; i < 5; ++i) - r[i] = swap_u_int32_t (m->counter[i]); + r[i] = swap_uint32_t (m->counter[i]); } #endif } |