patch-2.4.25 linux-2.4.25/crypto/sha256.c
Next file: linux-2.4.25/crypto/sha512.c
Previous file: linux-2.4.25/crypto/serpent.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/crypto/sha256.c
- Orig date:
2003-08-25 04:44:40.000000000 -0700
diff -urN linux-2.4.24/crypto/sha256.c linux-2.4.25/crypto/sha256.c
@@ -34,12 +34,12 @@
static inline u32 Ch(u32 x, u32 y, u32 z)
{
- return ((x & y) ^ (~x & z));
+ return z ^ (x & (y ^ z));
}
static inline u32 Maj(u32 x, u32 y, u32 z)
{
- return ((x & y) ^ (x & z) ^ (y & z));
+ return (x & y) | (z & (x | y));
}
static inline u32 RORu32(u32 x, u32 y)
@@ -295,7 +295,7 @@
u8 bits[8];
unsigned int index, pad_len, t;
int i, j;
- const u8 padding[64] = { 0x80, };
+ static u8 padding[64] = { 0x80, };
/* Save number of bits */
t = sctx->count[0];
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)