-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels