npm install siphash24
When using the WASM implementation this module is almost as fast as the C version (around 10% slower on my laptop).
var siphash24 = require('siphash24') var hash = siphash24(Buffer.from('hello world'), Buffer.from('012345678012345678')) console.log(hash, 'hash of "hello world" as a uint8array')
var hash = siphash24(input, key, [hash])
Hash a Uint8Array/buffer using siphash24.
keyshould be a Uint8Array/buffer that is
hashcan to be optionally passed as the output buffer and should be
Returns the hash as a Uint8Array.
Boolean informing you if your runtime supports WASM.
Boolean informing you if the WASM implementation has been loaded.