diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-21 18:44:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 18:44:01 +0100 |
commit | 11690f693f82c0ca5b6bb4df49ebf9d5958560cf (patch) | |
tree | feb4d582ee1dc1ea33335b5047b58a7aa0c136a8 /vespajlib/src/main/java/com/yahoo/compress/Hasher.java | |
parent | aaaa5efdde6562a44e3fa4e6168783029d0d5a98 (diff) | |
parent | e6603ad4a1c5f19b92dd42f6e66abc2c92abb541 (diff) |
Merge pull request #24954 from vespa-engine/balder/wrap-openhft-in-vespajlib
Wrap openhft in vespajlib to contain dependency.[run-systemtest] MERGEOK
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); + } +} |