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

sodium-javascript

Package Overview
Dependencies
Maintainers
2
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.5.1 to 0.5.2

crypto_stream_xor_instance.js

2

package.json
{
"name": "sodium-javascript",
"version": "0.5.1",
"version": "0.5.2",
"description": "WIP - a pure javascript version of sodium-native",

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

var assert = require('nanoassert')
var randombytes = (function () {
var QUOTA = 65536 // limit for QuotaExceededException
var crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null
var crypto = typeof global !== 'undefined' ? crypto = (global.crypto || global.msCrypto) : null
function windowBytes (out, n) {
function browserBytes (out, n) {
for (var i = 0; i < n; i += QUOTA) {

@@ -21,3 +21,3 @@ crypto.getRandomValues(out.subarray(i, i + Math.min(n - i, QUOTA)))

if (crypto && crypto.getRandomValues) {
return windowBytes
return browserBytes
} else if (typeof require !== 'undefined') {

@@ -24,0 +24,0 @@ // Node.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