You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

16 lines
339 B

var sodium = require('sodium-universal')
blake2b.batch = blake2bBatch
module.exports = blake2b
function blake2b (buf) {
var out = Buffer.allocUnsafe(32)
sodium.crypto_generichash(out, buf)
return out
}
function blake2bBatch (batch) {
var out = Buffer.allocUnsafe(32)
sodium.crypto_generichash_batch(out, batch)
return out
}