Open binishbala opened 6 years ago
Can you try the master branch?
Able to see only master branch for the node. Checked out the master branch of the java code. After this also getting the different hash code in java and javascript.
I meant the master branch for this module (xxhash
).
Still the same result.
Hi, The hash value generated using the node-xxhash in node and net.jpountz.xxhash.XXHash32 in java are different. Please find the sample code and result when tried the generation of hash value of same string in java and node. Let me if i am doing any thing wrong.
In Node
var key = "Testkey" var data = Buffer.from(key); var SEED = 4321; var hash = XXHash.hash(data, SEED); console.log(hash); Result : 3297801581
In Java
String key = "Testkey"; int SEED = 4321; byte[] data = key.getBytes(); int hash = hash32.hash(data, 0, data.length, SEED); System.out.println("hash value" + hash);
Result : hash value-997165715
Thanks Binish