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

sodium-javascript

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sodium-javascript - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

15

memory.js
/* eslint-disable camelcase */
var MessageChannel = global.MessageChannel
if (MessageChannel == null) ({ MessageChannel } = require('worker' + '_threads'))

@@ -9,6 +7,5 @@ function sodium_malloc (n) {

const sink = new MessageChannel()
function sodium_free (n) {
sodium_memzero(n)
sink.port1.postMessage(n.buffer, [n.buffer])
loadSink().port1.postMessage(n.buffer, [n.buffer])
}

@@ -20,2 +17,12 @@

var sink
function loadSink () {
if (sink) return sink
var MessageChannel = global.MessageChannel
if (MessageChannel == null) ({ MessageChannel } = require('worker' + '_threads'))
sink = new MessageChannel()
return sink
}
module.exports = {

@@ -22,0 +29,0 @@ sodium_malloc,

{
"name": "sodium-javascript",
"version": "0.7.2",
"version": "0.7.3",
"description": "WIP - a pure javascript version of sodium-native",

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

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