#include <time.h>
#include <u64.h> /* gnulib for uint64_t */
+#ifdef HAVE_LIBNETTLE
+# include <nettle/memxor.h>
+#else
+# include <gl/memxor.h>
+# define gl_memxor memxor
+#endif
+
/* some systems had problems with long long int, thus,
* it is not used.
*/
return 0;
}
-/* Xor's two buffers and puts the output in the first one.
- */
-inline static void
-_gnutls_xor (opaque * o1, opaque * o2, int length)
-{
- int i;
- for (i = 0; i < length; i++)
- {
- o1[i] ^= o2[i];
- }
-}
-
-
-
#define MAX_PRF_BYTES 200
/* The PRF function expands a given secret
return result;
}
- _gnutls_xor (o1, o2, total_bytes);
+ memxor (o1, o2, total_bytes);
memcpy (ret, o1, total_bytes);
}