private-box
Advanced tools
Comparing version 0.2.1 to 0.3.0
26
index.js
@@ -1,2 +0,1 @@ | ||
var sodium = require('chloride') | ||
@@ -53,4 +52,3 @@ var scalarmult = sodium.crypto_scalarmult | ||
exports.decrypt = | ||
exports.multibox_open = function (ctxt, sk, max) { //, groups... | ||
exports.multibox_open_key = function (ctxt, sk, max) { //, groups... | ||
@@ -67,7 +65,3 @@ max = setMax(max) | ||
_key = secretbox_open(ctxt.slice(s, s + size), nonce, my_key) | ||
if(_key) { | ||
length = _key[0] | ||
key = _key.slice(1) | ||
continue | ||
} | ||
if(_key) return _key | ||
} | ||
@@ -79,1 +73,17 @@ | ||
exports.multibox_open_body = function (ctxt, _key) { //, groups... | ||
if(!_key) return | ||
var key = _key.slice(1) | ||
var length = _key[0] | ||
var start = 24+32, size = 32+1+16 | ||
var nonce = ctxt.slice(0, 24) | ||
return secretbox_open(ctxt.slice(start+length*size), nonce, key) | ||
} | ||
exports.decrypt = | ||
exports.multibox_open = function (ctxt, sk, max) { //, groups... | ||
var _key = exports.multibox_open_key(ctxt, sk, max) | ||
if(_key) return exports.multibox_open_body(ctxt, _key) | ||
} | ||
{ | ||
"name": "private-box", | ||
"description": "encrypt a message to a secret number of recipients", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/auditdrivencrypto/private-box", | ||
@@ -11,3 +11,3 @@ "repository": { | ||
"dependencies": { | ||
"chloride": "^2.2.1" | ||
"chloride": "^2.2.9" | ||
}, | ||
@@ -14,0 +14,0 @@ "devDependencies": { |
@@ -89,2 +89,1 @@ | ||
}) | ||
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
20330
134
6
Updatedchloride@^2.2.9