sodium-javascript/crypto_shorthash.js

13 lines
421 B
JavaScript
Raw Normal View History

2017-06-12 09:01:21 +00:00
var siphash = require('siphash24')
2017-06-12 08:05:49 +00:00
exports.crypto_shorthash_PRIMITIVE = 'siphash24'
2017-06-12 09:01:21 +00:00
exports.crypto_shorthash_BYTES = siphash.BYTES
exports.crypto_shorthash_KEYBYTES = siphash.KEYBYTES
exports.crypto_shorthash_WASM_SUPPORTED = siphash.WASM_SUPPORTED
exports.crypto_shorthash_ready = siphash.ready
2017-06-12 08:05:49 +00:00
exports.crypto_shorthash = shorthash
function shorthash (out, data, key, noAssert) {
2017-06-12 09:01:21 +00:00
siphash(data, key, out, noAssert)
2017-06-12 08:05:49 +00:00
}