aboutsummaryrefslogtreecommitdiffstats
path: root/rotxor64.c
diff options
context:
space:
mode:
Diffstat (limited to 'rotxor64.c')
-rw-r--r--rotxor64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rotxor64.c b/rotxor64.c
new file mode 100644
index 0000000..21acacf
--- /dev/null
+++ b/rotxor64.c
@@ -0,0 +1,10 @@
+#include <linux/kernel.h>
+
+void mix_rotxor64(u32 h[4], const u32 v[4])
+{
+ u64 *h64 = (u64 *)h;
+ const u64 *v64 = (const u64 *)v;
+
+ h64[0] = ror64(h64[0], 19) ^ v64[0];
+ h64[1] = ror64(h64[1], 19) ^ v64[1];
+}