Socket
Socket
Sign inDemoInstall

asn1js

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asn1js - npm Package Compare versions

Comparing version 1.2.4 to 1.2.8

84

org/pkijs/common.js

@@ -66,2 +66,69 @@ /*

//**************************************************************************************
var CalculatorMixin = Base => class extends Base
{
calc() { }
};
var RandomizerMixin = Base => class extends Base
{
randomize() { }
};
class Foo { }
class Bar extends CalculatorMixin(RandomizerMixin(Foo)) { }
//**************************************************************************************
// #region Settings for "crypto engine"
//**************************************************************************************
local.engine = {
name: "none",
crypto: null,
subtle: null
};
if(typeof window != "undefined")
{
if("crypto" in window)
{
var engineName = "webcrypto";
var cryptoObject = window.crypto;
var subtleObject = null;
// Apple Safari support
if("webkitSubtle" in window.crypto)
subtleObject = window.crypto.webkitSubtle;
if("subtle" in window.crypto)
subtleObject = window.crypto.subtle;
local.engine = {
name: engineName,
crypto: cryptoObject,
subtle: subtleObject
};
}
}
//**************************************************************************************
in_window.org.pkijs.setEngine =
function(name, crypto, subtle)
{
/// <summary>Setting the global "crypto engine" parameters</summary>
/// <param name="name" type="String">Auxiliary name for "crypto engine"</param>
/// <param name="crypto" type="Object">Object handling all root cryptographic requests (in fact currently it must handle only "getRandomValues")</param>
/// <param name="subtle" type="Object">Object handling all main cryptographic requests</param>
local.engine = {
name: name,
crypto: crypto,
subtle: subtle
};
}
//**************************************************************************************
in_window.org.pkijs.getEngine =
function()
{
return local.engine;
}
//**************************************************************************************
// #endregion
//**************************************************************************************
// #region Declaration of common functions

@@ -98,3 +165,3 @@ //**************************************************************************************

{
for(i in from.prototype)
for(var i in from.prototype)
{

@@ -218,12 +285,5 @@ if(typeof from.prototype[i] === "function")

if("crypto" in in_window)
{
// Apple Safari support
if("webkitSubtle" in in_window.crypto)
crypto_temp = in_window.crypto.webkitSubtle;
if(local.engine.subtle !== null)
crypto_temp = local.engine.subtle;
if("subtle" in in_window.crypto)
crypto_temp = in_window.crypto.subtle;
}
return crypto_temp;

@@ -326,4 +386,4 @@ }

if("crypto" in in_window)
return in_window.crypto.getRandomValues(view);
if(local.engine.crypto !== null)
return local.engine.crypto.getRandomValues(view);
else

@@ -330,0 +390,0 @@ throw new Error("No support for Web Cryptography API");

2

package.json

@@ -8,3 +8,3 @@ {

"description": "ASN1js is a pure JavaScript library implementing this standard. ASN.1 is the basis of all X.509 related data structures and numerous other protocols used on the web",
"version": "1.2.4",
"version": "1.2.8",
"repository": {

@@ -11,0 +11,0 @@ "type": "git",

Sorry, the diff of this file is too big to display

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