The unified diff between revisions [92f17752..] and [11a5f681..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'src/bit_ops.cpp'

#
#
# patch "src/bit_ops.cpp"
#  from [b35d3f6d5f4ea883ba3551f958ac08ad3f028036]
#    to [2ba91b43b2dd429baa3dfef7290f5e40f7ae19fb]
#
============================================================
--- src/bit_ops.cpp	b35d3f6d5f4ea883ba3551f958ac08ad3f028036
+++ src/bit_ops.cpp	2ba91b43b2dd429baa3dfef7290f5e40f7ae19fb
@@ -1,44 +1,14 @@
 /*************************************************
 * Bit/Word Operations Source File                *
-* (C) 1999-2006 The Botan Project                *
+* (C) 1999-2008 Jack Lloyd                       *
 *************************************************/

 #include <botan/bit_ops.h>
+#include <botan/loadstor.h>

 namespace Botan {

 /*************************************************
-* XOR arrays together                            *
-*************************************************/
-void xor_buf(byte data[], const byte mask[], u32bit length)
-   {
-   while(length >= 8)
-      {
-      data[0] ^= mask[0]; data[1] ^= mask[1];
-      data[2] ^= mask[2]; data[3] ^= mask[3];
-      data[4] ^= mask[4]; data[5] ^= mask[5];
-      data[6] ^= mask[6]; data[7] ^= mask[7];
-      data += 8; mask += 8; length -= 8;
-      }
-   for(u32bit j = 0; j != length; ++j)
-      data[j] ^= mask[j];
-   }
-
-void xor_buf(byte out[], const byte in[], const byte mask[], u32bit length)
-   {
-   while(length >= 8)
-      {
-      out[0] = in[0] ^ mask[0]; out[1] = in[1] ^ mask[1];
-      out[2] = in[2] ^ mask[2]; out[3] = in[3] ^ mask[3];
-      out[4] = in[4] ^ mask[4]; out[5] = in[5] ^ mask[5];
-      out[6] = in[6] ^ mask[6]; out[7] = in[7] ^ mask[7];
-      in += 8; out += 8; mask += 8; length -= 8;
-      }
-   for(u32bit j = 0; j != length; ++j)
-      out[j] = in[j] ^ mask[j];
-   }
-
-/*************************************************
 * Return true iff arg is 2**n for some n > 0     *
 *************************************************/
 bool power_of_2(u64bit arg)