diff options
Diffstat (limited to 'vespajlib/src/main/java/com/yahoo/compress/Hasher.java')
-rw-r--r-- | vespajlib/src/main/java/com/yahoo/compress/Hasher.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/compress/Hasher.java b/vespajlib/src/main/java/com/yahoo/compress/Hasher.java new file mode 100644 index 00000000000..53d9cbb4f0c --- /dev/null +++ b/vespajlib/src/main/java/com/yahoo/compress/Hasher.java @@ -0,0 +1,14 @@ +package com.yahoo.compress; + +import net.openhft.hashing.LongHashFunction; + +/** + * Utility for hashing providing multiple hashing methods + * @author baldersheim + */ +public class Hasher { + /** Uses net.openhft.hashing.LongHashFunction.xx3() */ + public static long xxh3(byte [] data) { + return LongHashFunction.xx3().hashBytes(data); + } +} |