* Evgeniy Polyakov | 2007-06-14 14:57:45 [+0400]: >On Thu, Jun 14, 2007 at 12:20:06AM +0200, Sebastian Siewior (linux-crypto@xxxxxxxxxxxxxxxx) wrote: >> static void xor_64(u8 *a, const u8 *b, unsigned int bs) >> { >> +#if BITS_PER_LONG == 64 >> + ((u64 *)a)[0] ^= ((u64 *)b)[0]; >> +#else >> ((u32 *)a)[0] ^= ((u32 *)b)[0]; >> ((u32 *)a)[1] ^= ((u32 *)b)[1]; >> +#endif >> } > >What about endianess? It doesn't effect the xor operation. Either I load both LE, xor, store LE or load both BE, xor, store BE. The result is always the same. An additional endian convert would make thinks just slower. Since you confused me a little, I tested it on ppc and amd64 :) > >-- > Evgeniy Polyakov Sebastian - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html