Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

private-box

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

private-box - npm Package Compare versions

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 @@

})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc