Skip to content

different results from java #32

@vast-z

Description

@vast-z

java code:
long key = LongHashFunction.xx().hashChar('a');
String key = Long.toHexString(key);
System.out.println(key);

result: e513e02c99167f96

js code:
const xxhash = require('xxhash')
const buffer = Buffer.from('a')
const key = xxhash.hash64(buffer, 0).toString('hex')
console.log(key)

result: 5b6e8ca9f1c44ed2

I don't know the reason, thacks for the author!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions