hypercore-xsalsa20-onwrite-hook
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -7,3 +7,3 @@ const xsalsa20 = require('xsalsa20') | ||
function createHook(opts) { | ||
if (!opts || 'object' !== typeof opts) { | ||
if (opts && 'object' !== typeof opts) { | ||
throw new TypeError('Expecting options to be an object.') | ||
@@ -40,3 +40,3 @@ } | ||
// update the buffer in place | ||
if (feed.writable || !peer || !Buffer.isBuffer(data)) { | ||
if (!opts.key || feed.writable || !peer || !Buffer.isBuffer(data)) { | ||
done(null) | ||
@@ -43,0 +43,0 @@ } else { |
{ | ||
"name": "hypercore-xsalsa20-onwrite-hook", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A write hook to decrypt data using a XSalsa20 cipher into a hypercore storage when replicating from peers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6497