New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-crypto

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-crypto - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

3

dist/asn1.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._readTime = exports._findBlockAtIndex = exports._readDirectoryName = exports.compactDirectoryName = exports._readValue = exports._readVersionValue = exports._readBooleanValue = exports._readIntegerValue = exports._readLongIntegerValue = exports._readSignatureValue = exports._readSignatureValueBin = exports._readAlgorithmIdentifier = exports._readObjectIdentifier = exports._readListOfInteger = exports._readIntegerAsByteString = exports._getBlock = exports._readOctetString = exports.formatBuffer2DigitHexWithColum = exports._readBitString = exports.parseBitString = exports._readStruct = exports.readTag = exports.TagType = void 0;
const _ = require("underscore");
const assert = require("assert");

@@ -31,3 +30,3 @@ const oid_map_1 = require("./oid_map");

assert(buf instanceof Buffer);
assert(_.isNumber(pos) && pos >= 0);
assert(Number.isFinite(pos) && pos >= 0);
// istanbul ignore next

@@ -34,0 +33,0 @@ if (buf.length <= pos) {

@@ -56,3 +56,2 @@ "use strict";

// $ openssl asn1parse -in cert.pem
const _ = require("underscore");
const assert = require("assert");

@@ -74,5 +73,5 @@ const asn1_1 = require("./asn1");

const result = {};
_.forEach(data, (value, key) => {
for (const [key, value] of Object.entries(data)) {
result[key] = value;
});
}
return result;

@@ -363,5 +362,7 @@ }

inner_blocks = asn1_1._readStruct(buffer, inner_blocks[0]);
const exts = inner_blocks.map((block) => _readExtension(buffer, block));
const extensions = inner_blocks.map((block) => _readExtension(buffer, block));
const result = {};
_.forEach(exts, (e) => (result[e.identifier.name] = e.value));
for (const e of extensions) {
result[e.identifier.name] = e.value;
}
return result;

@@ -537,3 +538,2 @@ }

function combine_der(certificates) {
assert(_.isArray(certificates));
// perform some sanity check

@@ -540,0 +540,0 @@ for (const cert of certificates) {

@@ -8,3 +8,2 @@ "use strict";

const crypto = require("crypto");
const _ = require("underscore");
const buffer_utils_1 = require("./buffer_utils");

@@ -84,5 +83,5 @@ const crypto_utils_1 = require("./crypto_utils");

function computeDerivedKeys(secret, seed, options) {
assert(_.isFinite(options.signatureLength));
assert(_.isFinite(options.encryptingKeyLength));
assert(_.isFinite(options.encryptingBlockSize));
assert(Number.isFinite(options.signatureLength));
assert(Number.isFinite(options.encryptingKeyLength));
assert(Number.isFinite(options.encryptingBlockSize));
assert(typeof options.algorithm === "string");

@@ -89,0 +88,0 @@ options.sha1or256 = options.sha1or256 || "SHA1";

@@ -1,2 +0,1 @@

import * as _ from "underscore";
import * as assert from "assert";

@@ -35,3 +34,3 @@ import { oid_map } from "./oid_map";

assert(buf instanceof Buffer);
assert(_.isNumber(pos) && pos >= 0);
assert(Number.isFinite(pos) && pos >= 0);
// istanbul ignore next

@@ -38,0 +37,0 @@ if (buf.length <= pos) {

@@ -55,3 +55,2 @@ /**

// $ openssl asn1parse -in cert.pem
import * as _ from "underscore";
import * as assert from "assert";

@@ -112,5 +111,7 @@

const result: AttributeTypeAndValue = {};
_.forEach(data, (value, key) => {
for(const [key, value] of Object.entries(data)) {
result[key] = value;
});
}
return result;

@@ -453,6 +454,8 @@ }

const exts = inner_blocks.map((block) => _readExtension(buffer, block));
const extensions = inner_blocks.map((block) => _readExtension(buffer, block));
const result: any = {};
_.forEach(exts, (e) => (result[e.identifier.name] = e.value));
for (const e of extensions) {
result[e.identifier.name] = e.value;
}
return result as CertificateExtension;

@@ -708,3 +711,2 @@ }

export function combine_der(certificates: Certificate[]): Certificate {
assert(_.isArray(certificates));

@@ -711,0 +713,0 @@ // perform some sanity check

@@ -5,3 +5,2 @@ /**

import * as crypto from "crypto";
import * as _ from "underscore";

@@ -111,5 +110,5 @@ import { createFastUninitializedBuffer } from "./buffer_utils";

export function computeDerivedKeys(secret: Nonce, seed: Nonce, options: ComputeDerivedKeysOptions): DerivedKeys {
assert(_.isFinite(options.signatureLength));
assert(_.isFinite(options.encryptingKeyLength));
assert(_.isFinite(options.encryptingBlockSize));
assert(Number.isFinite(options.signatureLength));
assert(Number.isFinite(options.encryptingKeyLength));
assert(Number.isFinite(options.encryptingBlockSize));
assert(typeof options.algorithm === "string");

@@ -116,0 +115,0 @@ options.sha1or256 = options.sha1or256 || "SHA1";

{
"name": "node-opcua-crypto",
"version": "1.3.4",
"version": "1.3.5",
"description": "Crypto tools for Node-OPCUA",

@@ -33,2 +33,3 @@ "main": "./dist/index.js",

"@typescript-eslint/parser": "^3.8.0",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",

@@ -41,6 +42,5 @@ "eslint-plugin-prettier": "^3.1.4",

"source-map": "^0.7.3",
"eslint": "^7.6.0",
"tslint": "^6.1.3",
"source-map-support": "^0.5.19",
"ts-node": "^8.10.2",
"tslint": "^6.1.3",
"typescript": "^3.9.7"

@@ -53,4 +53,3 @@ },

"jsrsasign": "^8.0.23",
"sshpk": "^1.16.1",
"underscore": "^1.10.2"
"sshpk": "^1.16.1"
},

@@ -57,0 +56,0 @@ "repository": {

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