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

keystore-idb

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keystore-idb - npm Package Compare versions

Comparing version 0.13.0 to 0.13.2

17

aes/index.js

@@ -13,11 +13,18 @@ "use strict";

};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
var keys_1 = require("./keys");
var operations_1 = require("./operations");
__export(require("./keys"));
__export(require("./operations"));
__exportStar(require("./keys"), exports);
__exportStar(require("./operations"), exports);
exports.default = __assign(__assign({}, keys_1.default), operations_1.default);
//# sourceMappingURL=index.js.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.importKey = exports.makeKey = void 0;
var utils_1 = require("../utils");

@@ -41,0 +42,0 @@ var constants_1 = require("../constants");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.exportKey = exports.decrypt = exports.encrypt = exports.decryptBytes = exports.encryptBytes = void 0;
var keys_1 = require("./keys");

@@ -98,8 +99,6 @@ var utils_1 = require("../utils");

cipherBytes = cipherText.slice(16);
return [4 /*yield*/, window.crypto.subtle.decrypt({ name: alg,
length: (opts === null || opts === void 0 ? void 0 : opts.length) || constants_1.DEFAULT_SYMM_LEN,
return [4 /*yield*/, window.crypto.subtle.decrypt({ name: alg, length: (opts === null || opts === void 0 ? void 0 : opts.length) || constants_1.DEFAULT_SYMM_LEN,
// AES-CTR uses a counter, AES-GCM/AES-CBC use an initialization vector
iv: alg === types_1.SymmAlg.AES_CTR ? undefined : iv,
counter: alg === types_1.SymmAlg.AES_CTR ? new Uint8Array(iv) : undefined,
}, importedKey, cipherBytes)];
counter: alg === types_1.SymmAlg.AES_CTR ? new Uint8Array(iv) : undefined, }, importedKey, cipherBytes)];
case 4:

@@ -106,0 +105,0 @@ msgBuff = _b.sent();

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.symmKeyOpts = exports.merge = exports.eccEnabled = exports.normalize = exports.defaultConfig = void 0;
var keys_1 = require("./ecc/keys");

@@ -52,0 +53,0 @@ var constants_1 = require("./constants");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_WRITE_KEY_NAME = exports.DEFAULT_READ_KEY_NAME = exports.DEFAULT_STORE_NAME = exports.DEFAULT_CHAR_SIZE = exports.DEFAULT_HASH_ALG = exports.DEFAULT_SYMM_LEN = exports.DEFAULT_SYMM_ALG = exports.DEFAULT_RSA_SIZE = exports.DEFAULT_ECC_CURVE = exports.DEFAULT_CRYPTOSYSTEM = exports.SALT_LENGTH = exports.RSA_WRITE_ALG = exports.RSA_READ_ALG = exports.ECC_WRITE_ALG = exports.ECC_READ_ALG = void 0;
var types_1 = require("./types");

@@ -4,0 +5,0 @@ exports.ECC_READ_ALG = 'ECDH';

@@ -13,5 +13,12 @@ "use strict";

};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -21,6 +28,6 @@ var keys_1 = require("./keys");

var keystore_1 = require("./keystore");
__export(require("./keys"));
__export(require("./operations"));
__export(require("./keystore"));
__exportStar(require("./keys"), exports);
__exportStar(require("./operations"), exports);
__exportStar(require("./keystore"), exports);
exports.default = __assign(__assign(__assign({}, keys_1.default), operations_1.default), keystore_1.default);
//# sourceMappingURL=index.js.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.importPublicKey = exports.makeKeypair = void 0;
var utils_1 = require("../utils");

@@ -41,0 +42,0 @@ var constants_1 = require("../constants");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.ECCKeyStore = void 0;
var idb_1 = require("../idb");

@@ -151,4 +152,3 @@ var keys_1 = require("./keys");

return [4 /*yield*/, operations_1.default.decrypt(cipherText, readKey.privateKey, publicKey, mergedCfg.charSize, mergedCfg.curve)];
case 2: return [2 /*return*/, _b.apply(_a, [_c.sent(),
mergedCfg.charSize])];
case 2: return [2 /*return*/, _b.apply(_a, [_c.sent(), mergedCfg.charSize])];
}

@@ -155,0 +155,0 @@ });

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getSharedKey = exports.getPublicKey = exports.decrypt = exports.encrypt = exports.verify = exports.sign = void 0;
var aes_1 = require("../aes");

@@ -41,0 +42,0 @@ var keys_1 = require("./keys");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkValidKeyUse = exports.checkValidCryptoSystem = exports.checkIsKey = exports.checkIsKeyPair = exports.InvalidKeyUse = exports.UnsupportedCrypto = exports.ECCNotEnabled = exports.NotKey = exports.NotKeyPair = exports.KeyDoesNotExist = void 0;
var types_1 = require("./types");

@@ -4,0 +5,0 @@ exports.KeyDoesNotExist = new Error("Key does not exist. Make sure you properly instantiated the keystore.");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.clear = exports.dropStore = exports.rm = exports.exists = exports.get = exports.getKey = exports.getKeypair = exports.put = exports.createIfDoesNotExist = exports.createStore = void 0;
var localforage_1 = require("localforage");

@@ -41,0 +42,0 @@ var errors_1 = require("./errors");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.clear = exports.init = void 0;
var keystore_1 = require("../ecc/keystore");

@@ -41,0 +42,0 @@ var keystore_2 = require("../rsa/keystore");

{
"name": "keystore-idb",
"version": "0.13.0",
"version": "0.13.2",
"description": "In-browser key management with IndexedDB and the Web Crypto API",

@@ -17,3 +17,3 @@ "keywords": [],

"engines": {
"node": ">=6.0.0"
"node": ">=10.21.0"
},

@@ -20,0 +20,0 @@ "scripts": {

@@ -13,5 +13,12 @@ "use strict";

};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -21,6 +28,6 @@ var keys_1 = require("./keys");

var keystore_1 = require("./keystore");
__export(require("./keys"));
__export(require("./operations"));
__export(require("./keystore"));
__exportStar(require("./keys"), exports);
__exportStar(require("./operations"), exports);
__exportStar(require("./keystore"), exports);
exports.default = __assign(__assign(__assign({}, keys_1.default), operations_1.default), keystore_1.default);
//# sourceMappingURL=index.js.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.importPublicKey = exports.makeKeypair = void 0;
var constants_1 = require("../constants");

@@ -41,0 +42,0 @@ var types_1 = require("../types");

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.RSAKeyStore = void 0;
var idb_1 = require("../idb");

@@ -148,4 +149,3 @@ var keys_1 = require("./keys");

return [4 /*yield*/, operations_1.default.decrypt(cipherText, readKey.privateKey, mergedCfg.charSize)];
case 2: return [2 /*return*/, _b.apply(_a, [_c.sent(),
mergedCfg.charSize])];
case 2: return [2 /*return*/, _b.apply(_a, [_c.sent(), mergedCfg.charSize])];
}

@@ -152,0 +152,0 @@ });

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.getPublicKey = exports.decrypt = exports.encrypt = exports.verify = exports.sign = void 0;
var keys_1 = require("./keys");

@@ -41,0 +42,0 @@ var utils_1 = require("../utils");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyUse = exports.CharSize = exports.HashAlg = exports.SymmKeyLength = exports.SymmAlg = exports.RsaSize = exports.EccCurve = exports.CryptoSystem = void 0;
var CryptoSystem;

@@ -4,0 +5,0 @@ (function (CryptoSystem) {

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.structuralClone = exports.normalizeToBuf = exports.normalizeUnicodeToBuf = exports.normalizeBase64ToBuf = exports.normalizeUtf16ToBuf = exports.normalizeUtf8ToBuf = exports.joinBufs = exports.randomBuf = exports.publicExponent = exports.base64ToArrBuf = exports.strToArrBuf = exports.arrBufToBase64 = exports.arrBufToStr = void 0;
var types_1 = require("./types");

@@ -41,0 +42,0 @@ function arrBufToStr(buf, charSize) {

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

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

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 too big to display

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

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