Socket
Socket
Sign inDemoInstall

sodium-native

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sodium-native - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

prebuilds/linux-arm/electron.napi.node

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # CHANGELOG

## v3.0.1
* Fixed an issue that caused an assert error if an async callback threw an exception.
## v3.0.0

@@ -7,0 +11,0 @@

2

package.json
{
"name": "sodium-native",
"version": "3.0.0",
"version": "3.0.1",
"description": "Low level bindings for libsodium",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,3 +16,3 @@ var test = require('tape')

test('ported from libsodium', function (assert) { /* eslint-disable */
test('ported from libsodium', function (assert) { /* eslint-disable */
var mlen = 114

@@ -19,0 +19,0 @@ var adlen = 12

@@ -151,1 +151,75 @@ var tape = require('tape')

})
tape('crypto_pwhash_scryptsalsa208sha256_async uncaughtException', function (t) {
var output = Buffer.alloc(32) // can be any size
var passwd = Buffer.from('Hej, Verden!')
var salt = Buffer.alloc(sodium.crypto_pwhash_scryptsalsa208sha256_SALTBYTES, 'lo')
var opslimit = sodium.crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE
var memlimit = sodium.crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
process.on('uncaughtException', listener)
sodium.crypto_pwhash_scryptsalsa208sha256_async(output, passwd, salt, opslimit, memlimit, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message !== 'caught') {
t.fail()
} else {
t.pass()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})
tape('crypto_pwhash_scryptsalsa208sha256_str_async uncaughtException', function (t) {
var output = Buffer.alloc(sodium.crypto_pwhash_scryptsalsa208sha256_STRBYTES) // can be any size
var passwd = Buffer.from('Hej, Verden!')
var opslimit = sodium.crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE
var memlimit = sodium.crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
process.on('uncaughtException', listener)
sodium.crypto_pwhash_scryptsalsa208sha256_str_async(output, passwd, opslimit, memlimit, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message === 'caught') {
t.pass()
} else {
t.fail()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})
tape('crypto_pwhash_scryptsalsa208sha256_str_verify_async uncaughtException', function (t) {
var output = Buffer.alloc(sodium.crypto_pwhash_scryptsalsa208sha256_STRBYTES) // can be any size
var passwd = Buffer.from('Hej, Verden!')
process.on('uncaughtException', listener)
sodium.crypto_pwhash_scryptsalsa208sha256_str_verify_async(output, passwd, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message === 'caught') {
t.pass()
} else {
t.fail()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})

@@ -158,1 +158,76 @@ var tape = require('tape')

})
tape('crypto_pwhash_async uncaughtException', function (t) {
var output = Buffer.alloc(32) // can be any size
var passwd = Buffer.from('Hej, Verden!')
var salt = Buffer.alloc(sodium.crypto_pwhash_SALTBYTES, 'lo')
var opslimit = sodium.crypto_pwhash_OPSLIMIT_INTERACTIVE
var memlimit = sodium.crypto_pwhash_MEMLIMIT_INTERACTIVE
var algo = sodium.crypto_pwhash_ALG_DEFAULT
process.on('uncaughtException', listener)
sodium.crypto_pwhash_async(output, passwd, salt, opslimit, memlimit, algo, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message !== 'caught') {
t.fail()
} else {
t.pass()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})
tape('crypto_pwhash_str_async uncaughtException', function (t) {
var output = Buffer.alloc(sodium.crypto_pwhash_STRBYTES) // can be any size
var passwd = Buffer.from('Hej, Verden!')
var opslimit = sodium.crypto_pwhash_OPSLIMIT_INTERACTIVE
var memlimit = sodium.crypto_pwhash_MEMLIMIT_INTERACTIVE
process.on('uncaughtException', listener)
sodium.crypto_pwhash_str_async(output, passwd, opslimit, memlimit, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message === 'caught') {
t.pass()
} else {
t.fail()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})
tape('crypto_pwhash_str_verify_async uncaughtException', function (t) {
var output = Buffer.alloc(sodium.crypto_pwhash_STRBYTES) // can be any size
var passwd = Buffer.from('Hej, Verden!')
process.on('uncaughtException', listener)
sodium.crypto_pwhash_str_verify_async(output, passwd, exception)
function exception () {
throw new Error('caught')
}
function listener (err) {
if (err.message === 'caught') {
t.pass()
} else {
t.fail()
}
process.removeListener('uncaughtException', listener)
t.end()
}
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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