graphene-pk11
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -43,3 +43,3 @@ "use strict"; | ||
else if (core.isNumber(algorithm)) { | ||
alg = { name: mech_enum_1.MechanismEnum[algorithm], params: null }; | ||
alg = { name: algorithm, params: null }; | ||
} | ||
@@ -49,6 +49,12 @@ else { | ||
} | ||
const hAlg = mech_enum_1.MechanismEnum[alg.name.toUpperCase()]; | ||
if (core.isEmpty(hAlg)) { | ||
throw new TypeError(`Unknown mechanism name '${alg.name}'`); | ||
let hAlg; | ||
if (core.isNumber(alg.name)) { | ||
hAlg = alg.name; | ||
} | ||
else { | ||
hAlg = mech_enum_1.MechanismEnum[alg.name.toUpperCase()]; | ||
if (core.isEmpty(hAlg)) { | ||
throw new TypeError(`Unknown mechanism name '${alg.name}'`); | ||
} | ||
} | ||
let params = null; | ||
@@ -55,0 +61,0 @@ if (alg.params) { |
@@ -39,3 +39,3 @@ import { Int64LE } from "int64-buffer"; | ||
else if (core.isNumber(algorithm)) { | ||
alg = { name: MechanismEnum[algorithm], params: null }; | ||
alg = { name: algorithm, params: null }; | ||
} | ||
@@ -45,6 +45,12 @@ else { | ||
} | ||
const hAlg = MechanismEnum[alg.name.toUpperCase()]; | ||
if (core.isEmpty(hAlg)) { | ||
throw new TypeError(`Unknown mechanism name '${alg.name}'`); | ||
let hAlg; | ||
if (core.isNumber(alg.name)) { | ||
hAlg = alg.name; | ||
} | ||
else { | ||
hAlg = MechanismEnum[alg.name.toUpperCase()]; | ||
if (core.isEmpty(hAlg)) { | ||
throw new TypeError(`Unknown mechanism name '${alg.name}'`); | ||
} | ||
} | ||
let params = null; | ||
@@ -51,0 +57,0 @@ if (alg.params) { |
@@ -14,3 +14,3 @@ /// <reference types="node" /> | ||
*/ | ||
name: keyof typeof MechanismEnum | string; | ||
name: keyof typeof MechanismEnum | string | number; | ||
/** | ||
@@ -17,0 +17,0 @@ * The algorithm parameters |
{ | ||
"name": "graphene-pk11", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "A simple layer for interacting with PKCS #11 / PKCS11 / CryptoKI for Node in TypeScript", | ||
@@ -24,3 +24,3 @@ "main": "./build/cjs/index.js", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"docs": "typedoc --mode file --inputFiles ./src --out docs" | ||
"docs": "typedoc" | ||
}, | ||
@@ -40,17 +40,17 @@ "files": [ | ||
"dependencies": { | ||
"int64-buffer": "^1.0.0", | ||
"pkcs11js": "^1.2.0", | ||
"tslib": "^2.0.3" | ||
"int64-buffer": "^1.0.1", | ||
"pkcs11js": "^1.2.2", | ||
"tslib": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^8.0.4", | ||
"@types/node": "^12.19.7", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.43", | ||
"coveralls": "^3.1.0", | ||
"mocha": "^8.2.1", | ||
"mocha": "^8.3.2", | ||
"nyc": "^15.1.0", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^9.0.0", | ||
"ts-node": "^9.1.1", | ||
"tslint": "^6.1.3", | ||
"typedoc": "^0.19.2", | ||
"typescript": "^4.1.2" | ||
"typedoc": "^0.20.36", | ||
"typescript": "^4.2.4" | ||
}, | ||
@@ -57,0 +57,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
320807
7739
406
Updatedint64-buffer@^1.0.1
Updatedpkcs11js@^1.2.2
Updatedtslib@^2.2.0