Comments (4)
We can't figure out how to have the python implementation find the same key for LongHashFunction.xx().hashChars("test")
You probably need to encode a string in UTF-16, because that's what essentially the Java's character arrays are. Also would need byte order, though.
from zero-allocation-hashing.
anyone been able to provide this? we would be interested in this as well.
from zero-allocation-hashing.
We had the same issue, except with nodejs.
In the end what produced the same hash was:
LongHashFunction.xx(123).hashBytes("teststring".getBytes("UTF-8"))
and in nodejs:
const hash = XXHash.hash64(Buffer.from('teststring', 'utf-8'), 123);
const hashValue = hash.readBigUInt64LE();
I hope this helps someone in the future.
from zero-allocation-hashing.
This should not be an issue.
the default encoding in different languages are not same. to get the same hash result, the binary layout of the input must be exactly same, so select a well defined encoding codec before hash.
from zero-allocation-hashing.
Related Issues (20)
- Class loading deadlock when using LongTupleHashFunction & LongHashFunction HOT 7
- XXH3_128bits HOT 3
- migrating CI to travis-ci.com
- Release to Maven central HOT 5
- Support for JDK Jigsaw Modules HOT 3
- How to build to a jar? Can't find main class HOT 2
- Hashing a CharSequence directly HOT 6
- release failed HOT 5
- Endianness and hashLong HOT 1
- Replace Unsafe with VarHandle HOT 7
- Murmur3 is incompatible with C++ reference implementation for negative seed values HOT 2
- Github Action fails on pull request: Build and analyze HOT 2
- net.openhft.hashing.UtilTest#testStringHash fails on Zing HOT 3
- Support jakarta HOT 1
- Possible alignment issues crashing JVM on SPARC platform HOT 6
- murmur3: different output for hashChars() and hashBytes() HOT 2
- Release notes for version 0.16? HOT 1
- How to correctly calculate hash for byte[][]?
- can you implement balloon hash and argon ? HOT 1
- can you support for cityhash 1.0.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zero-allocation-hashing.