hypercore-crypto
Advanced tools
Comparing version 3.3.1 to 3.4.0
@@ -90,2 +90,11 @@ const sodium = require('sodium-universal') | ||
exports.hash = function (data, out) { | ||
if (!out) out = b4a.allocUnsafe(32) | ||
if (!Array.isArray(data)) data = [data] | ||
sodium.crypto_generichash_batch(out, data) | ||
return out | ||
} | ||
exports.randomBytes = function (n) { | ||
@@ -92,0 +101,0 @@ const buf = b4a.allocUnsafe(n) |
{ | ||
"name": "hypercore-crypto", | ||
"version": "3.3.1", | ||
"version": "3.4.0", | ||
"description": "The crypto primitives used in hypercore, extracted into a separate module", | ||
"main": "index.js", | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
@@ -7,0 +10,0 @@ "b4a": "^1.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6741
4
110