@piggly/secrets
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -9,22 +9,11 @@ "use strict"; | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _AbstractKeyManagerService = require("./AbstractKeyManagerService.js"); | ||
var _indexes = require("../../utils/indexes.js"); | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
class KeyPairManagerService { | ||
constructor(abspath, current_version) { | ||
this._keypairs = new Map(); | ||
this._path = abspath; | ||
this._current_version = current_version ?? 1; | ||
} | ||
get raw() { | ||
return this._keypairs; | ||
} | ||
async load(name, index_name) { | ||
if (this._keypairs.has(name)) { | ||
this._keypairs.delete(name); | ||
} | ||
const keypairs = new Map(); | ||
class KeyPairManagerService extends _AbstractKeyManagerService.AbstractKeyManagerService { | ||
async load(index_name) { | ||
if (index_name) { | ||
const index = await (0, _indexes.readAll)('keypairs', this._path, index_name); | ||
index.forEach(i => { | ||
keypairs.set(i.version, { | ||
this._secrets.set(i.version, { | ||
sk: _fs.default.readFileSync(i.sk), | ||
@@ -34,27 +23,14 @@ pk: _fs.default.readFileSync(i.pk) | ||
}); | ||
this._keypairs.set(name, keypairs); | ||
return true; | ||
} | ||
const sk = _fs.default.readFileSync(_path.default.join(this._path, `${name}.sk.key`)); | ||
const pk = _fs.default.readFileSync(_path.default.join(this._path, `${name}.pk.key`)); | ||
keypairs.set(1, { | ||
const sk = _fs.default.readFileSync(_path.default.join(this._path, `${this._name}.sk.key`)); | ||
const pk = _fs.default.readFileSync(_path.default.join(this._path, `${this._name}.pk.key`)); | ||
this._secrets.set(this._current_version, { | ||
sk, | ||
pk | ||
}); | ||
this._keypairs.set(name, keypairs); | ||
return true; | ||
} | ||
async get(name, version) { | ||
if (this._keypairs.has(name) === false) { | ||
throw Error(`Key-pair ${name} not found.`); | ||
} | ||
const keypair = this._keypairs.get(name); | ||
const v = version ?? this._current_version; | ||
if (keypair.has(v) === false) { | ||
throw Error(`Key-pair ${name} version ${v} not found.`); | ||
} | ||
return keypair.get(v); | ||
} | ||
} | ||
exports.KeyPairManagerService = KeyPairManagerService; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcGF0aCIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2ZzIiwiX2luZGV4ZXMiLCJlIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJLZXlQYWlyTWFuYWdlclNlcnZpY2UiLCJjb25zdHJ1Y3RvciIsImFic3BhdGgiLCJjdXJyZW50X3ZlcnNpb24iLCJfa2V5cGFpcnMiLCJNYXAiLCJfY3VycmVudF92ZXJzaW9uIiwicmF3IiwibG9hZCIsIm5hbWUiLCJpbmRleF9uYW1lIiwiaGFzIiwiZGVsZXRlIiwia2V5cGFpcnMiLCJpbmRleCIsInJlYWRBbGwiLCJmb3JFYWNoIiwiaSIsInNldCIsInZlcnNpb24iLCJzayIsImZzIiwicmVhZEZpbGVTeW5jIiwicGsiLCJwYXRoIiwiam9pbiIsImdldCIsIkVycm9yIiwia2V5cGFpciIsInYiLCJleHBvcnRzIl0sInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvcmUvc2VydmljZXMvS2V5UGFpck1hbmFnZXJTZXJ2aWNlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xuaW1wb3J0IGZzIGZyb20gJ2ZzJztcblxuaW1wb3J0IHsgVmVyc2lvbmVkS2V5UGFpciB9IGZyb20gJ0AvdHlwZXMnO1xuaW1wb3J0IHsgcmVhZEFsbCB9IGZyb20gJ0AvdXRpbHMvaW5kZXhlcyc7XG5cbmV4cG9ydCBjbGFzcyBLZXlQYWlyTWFuYWdlclNlcnZpY2Uge1xuXHRwcml2YXRlIF9rZXlwYWlyczogTWFwPHN0cmluZywgTWFwPG51bWJlciwgeyBzazogQnVmZmVyOyBwazogQnVmZmVyIH0+PjtcblxuXHRwcml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agerService = void 0; | ||
var _path = _interopRequireDefault(require("path")); | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _indexes = require("../../utils/indexes.js"); | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
class SecretManagerService { | ||
constructor(abspath, current_version) { | ||
this._secrets = new Map(); | ||
this._path = abspath; | ||
this._current_version = current_version ?? 1; | ||
} | ||
get raw() { | ||
return this._secrets; | ||
} | ||
async load(name, index_name) { | ||
if (this._secrets.has(name)) { | ||
this._secrets.delete(name); | ||
} | ||
const secrets = new Map(); | ||
if (index_name) { | ||
const index = await (0, _indexes.readAll)('secrets', this._path, index_name); | ||
index.forEach(i => { | ||
secrets.set(i.version, _fs.default.readFileSync(i.file)); | ||
}); | ||
this._secrets.set(name, secrets); | ||
return true; | ||
} | ||
const secret = _fs.default.readFileSync(_path.default.join(this._path, `${name}.secret.key`)); | ||
secrets.set(1, secret); | ||
this._secrets.set(name, secrets); | ||
return true; | ||
} | ||
async get(name, version) { | ||
if (this._secrets.has(name) === false) { | ||
throw Error(`Secret ${name} not found.`); | ||
} | ||
const secret = this._secrets.get(name); | ||
const v = version ?? this._current_version; | ||
if (secret.has(v) === false) { | ||
throw Error(`Secret ${name} version ${v} not found.`); | ||
} | ||
return secret.get(v); | ||
} | ||
} | ||
var _AbstractKeyManagerService = require("./AbstractKeyManagerService.js"); | ||
class SecretManagerService extends _AbstractKeyManagerService.AbstractKeyManagerService {} | ||
exports.SecretManagerService = SecretManagerService; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcGF0aCIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2ZzIiwiX2luZGV4ZXMiLCJlIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJTZWNyZXRNYW5hZ2VyU2VydmljZSIsImNvbnN0cnVjdG9yIiwiYWJzcGF0aCIsImN1cnJlbnRfdmVyc2lvbiI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iaW1wb3J0IHsgQWJzdHJhY3RLZXlNYW5hZ2VyU2VydmljZSB9IGZyb20gJ0AvY29yZS9zZXJ2aWNlcy9BYnN0cmFjdEtleU1hbmFnZXJTZXJ2aWNlJztcblxuZXhwb3J0IGNsYXNzIFNlY3JldE1hbmFnZXJTZXJ2aWNlIGV4dGVuZHMgQWJzdHJhY3RLZXlNYW5hZ2VyU2VydmljZTxCdWZmZXI+IHt9XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFFTyxNQUFNQSxvQkFBb0IsU0FBU0Msb0RBQXlCLENBQVM7QUFBRUMsT0FBQSxDQUFBRixvQkFBQSxHQUFBQSxvQkFBQSIsImlnbm9yZUxpc3QiOltdfQ== |
@@ -6,2 +6,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "AbstractKeyManagerService", { | ||
enumerable: true, | ||
get: function () { | ||
return _AbstractKeyManagerService.AbstractKeyManagerService; | ||
} | ||
}); | ||
Object.defineProperty(exports, "KeyPairManagerService", { | ||
@@ -24,2 +30,3 @@ enumerable: true, | ||
var _KeyPairManagerService = require("./core/services/KeyPairManagerService.js"); | ||
var _AbstractKeyManagerService = require("./core/services/AbstractKeyManagerService.js"); | ||
var _SecretManagerService = require("./core/services/SecretManagerService.js"); | ||
@@ -53,2 +60,2 @@ const ed25519 = exports.ed25519 = { | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJlZDI1NTE5IiwiZXhwb3J0cyIsImdlbmVyYXRlS2V5UGFpciIsImdlbmVyYXRlS2V5UGFpckVkMjU1MTkiLCJnZW5lcmF0ZVNlY3JldCIsImdlbmVyYXRlU2VjcmV0RWQyNTUxOSIsImdlbmVyYXRlUHVibGljIiwiZ2VuZXJhdGVQdWJsaWNFZDI1NTE5Iiwic2lnbiIsInNpZ25FZDI1NTE5Iiwic2lnbkZyb21TdHJpbmciLCJzaWduRnJvbVN0cmluZ0VkMjU1MTkiL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XHRzYWx0X2xlbmd0aDogbnVtYmVyO1xufT47XG5cbmV4cG9ydCB0eXBlIFZlcnNpb25lZEtleSA9IHsgZmlsZTogc3RyaW5nOyBuYW1lOiBzdHJpbmc7IHZlcnNpb246IG51bWJlciB9O1xuXG5leHBvcnQgdHlwZSBWZXJzaW9uZWRLZXlQYWlyID0ge1xuXHRzazogc3RyaW5nO1xuXHRwazogc3RyaW5nO1xuXHRuYW1lOiBzdHJpbmc7XG5cdHZlcnNpb246IG51bWJlcjtcbn07XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUtleU1hbmFnZXJTZXJ2aWNlPEtleVR5cGUgPSBCdWZmZXI+IHtcblx0bG9hZChpbmRleF9uYW1lPzogc3RyaW5nKTogUHJvbWlzZTx0cnVlPjtcblx0Z2V0KHZlcnNpb24/OiBudW1iZXIpOiBLZXlUeXBlO1xuXHRnZXQgbmFtZSgpOiBzdHJpbmc7XG5cdGdldCBjdXJyZW50X3ZlcnNpb24oKTogbnVtYmVyO1xufVxuIl0sIm1hcHBpbmdzIjoiIiwiaWdub3JlTGlzdCI6W119 |
import path from 'path'; | ||
import fs from 'fs'; | ||
import { AbstractKeyManagerService } from "./AbstractKeyManagerService.js"; | ||
import { readAll } from "../../utils/indexes.js"; | ||
export class KeyPairManagerService { | ||
constructor(abspath, current_version) { | ||
this._keypairs = new Map(); | ||
this._path = abspath; | ||
this._current_version = current_version ?? 1; | ||
} | ||
get raw() { | ||
return this._keypairs; | ||
} | ||
async load(name, index_name) { | ||
if (this._keypairs.has(name)) { | ||
this._keypairs.delete(name); | ||
} | ||
const keypairs = new Map(); | ||
export class KeyPairManagerService extends AbstractKeyManagerService { | ||
async load(index_name) { | ||
if (index_name) { | ||
const index = await readAll('keypairs', this._path, index_name); | ||
index.forEach(i => { | ||
keypairs.set(i.version, { | ||
this._secrets.set(i.version, { | ||
sk: fs.readFileSync(i.sk), | ||
@@ -26,26 +15,13 @@ pk: fs.readFileSync(i.pk) | ||
}); | ||
this._keypairs.set(name, keypairs); | ||
return true; | ||
} | ||
const sk = fs.readFileSync(path.join(this._path, `${name}.sk.key`)); | ||
const pk = fs.readFileSync(path.join(this._path, `${name}.pk.key`)); | ||
keypairs.set(1, { | ||
const sk = fs.readFileSync(path.join(this._path, `${this._name}.sk.key`)); | ||
const pk = fs.readFileSync(path.join(this._path, `${this._name}.pk.key`)); | ||
this._secrets.set(this._current_version, { | ||
sk, | ||
pk | ||
}); | ||
this._keypairs.set(name, keypairs); | ||
return true; | ||
} | ||
async get(name, version) { | ||
if (this._keypairs.has(name) === false) { | ||
throw Error(`Key-pair ${name} not found.`); | ||
} | ||
const keypair = this._keypairs.get(name); | ||
const v = version ?? this._current_version; | ||
if (keypair.has(v) === false) { | ||
throw Error(`Key-pair ${name} version ${v} not found.`); | ||
} | ||
return keypair.get(v); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJwYXRoIiwiZnMiLCJyZWFkQWxsIiwiS2V5UGFpck1hbmFnZXJTZXJ2aWNlIiwiY29uc3RydWN0b3IiLCJhYnNwYXRoIiwiY3VycmVudF92ZXJzaW9uIiwiX2tleXBhaXJzIiwiTWFwIiwiX3BhdGgiLCJfY3VycmVudF92ZXJzaW9uIiwicmF3IiwibG9hZCIsIm5hbWUiLCJpbmRleF9uYW1lIiwiaGFzIiwiZGVsZXRlIiwia2V5cGFpcnMiLCJpbmRleCIsImZvckVhY2giLCJpIiwic2V0IiwidmVyc2lvbiIsInNrIiwicmVhZEZpbGVTeW5jIiwicGsiLCJqb2luIiwiZ2V0IiwiRXJyb3IiLCJrZXlwYWlyIiwidiJdLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb3JlL3NlcnZpY2VzL0tleVBhaXJNYW5hZ2VyU2VydmljZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcbmltcG9ydCBmcyBmcm9tIC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FLEVBQUViLEVBQUUsQ0FBQ2MsWUFBWSxDQUFDTCxDQUFDLENBQUNJLEVBQUUsQ0FBQztVQUN6QkUsRUFBRSxFQUFFZixFQUFFLENBQUNjLFlBQVksQ0FBQ0wsQ0FBQyxDQUFDTSxFQUFFO1FBQ3pCLENBQUMsQ0FBQztNQUNILENBQUMsQ0FBQztNQUVGLE9BQU8sSUFBSTtJQUNaO0lBRUEsTUFBTUYsRUFBRSxHQUFHYixFQUFFLENBQUNjLFlBQVksQ0FBQ2YsSUFBSSxDQUFDaUIsSUFBSSxDQUFDLElBQUksQ0FBQ1QsS0FBSyxFQUFFLEdBQUcsSUFBSSxDQUFDVSxLQUFLLFNBQVMsQ0FBQyxDQUFDO0lBQ3pFLE1BQU1GLEVBQUUsR0FBR2YsRUFBRSxDQUFDYyxZQUFZLENBQUNmLElBQUksQ0FBQ2lCLElBQUksQ0FBQyxJQUFJLENBQUNULEtBQUssRUFBRSxHQUFHLElBQUksQ0FBQ1UsS0FBSyxTQUFTLENBQUMsQ0FBQztJQUV6RSxJQUFJLENBQUNQLFFBQVEsQ0FBQ0MsR0FBRyxDQUFDLElBQUksQ0FBQ08sZ0JBQWdCLEVBQUU7TUFBRUwsRUFBRTtNQUFFRTtJQUFHLENBQUMsQ0FBQztJQUNwRCxPQUFPLElBQUk7RUFDWjtBQUNEIiwiaWdub3JlTGlzdCI6W119 |
@@ -1,43 +0,3 @@ | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
import { readAll } from "../../utils/indexes.js"; | ||
export class SecretManagerService { | ||
constructor(abspath, current_version) { | ||
this._secrets = new Map(); | ||
this._path = abspath; | ||
this._current_version = current_version ?? 1; | ||
} | ||
get raw() { | ||
return this._secrets; | ||
} | ||
async load(name, index_name) { | ||
if (this._secrets.has(name)) { | ||
this._secrets.delete(name); | ||
} | ||
const secrets = new Map(); | ||
if (index_name) { | ||
const index = await readAll('secrets', this._path, index_name); | ||
index.forEach(i => { | ||
secrets.set(i.version, fs.readFileSync(i.file)); | ||
}); | ||
this._secrets.set(name, secrets); | ||
return true; | ||
} | ||
const secret = fs.readFileSync(path.join(this._path, `${name}.secret.key`)); | ||
secrets.set(1, secret); | ||
this._secrets.set(name, secrets); | ||
return true; | ||
} | ||
async get(name, version) { | ||
if (this._secrets.has(name) === false) { | ||
throw Error(`Secret ${name} not found.`); | ||
} | ||
const secret = this._secrets.get(name); | ||
const v = version ?? this._current_version; | ||
if (secret.has(v) === false) { | ||
throw Error(`Secret ${name} version ${v} not found.`); | ||
} | ||
return secret.get(v); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJwYXRoIiwiZnMiLCJyZWFkQWxsIiwiU2VjcmV0TWFuYWdlclNlcnZpY2UiLCJjb25zdHJ1Y3RvciIsImFic3BhdGgiLCJjdXJyZW50X3ZlcnNpb24iLCJfc2VjcmV0cyIsIk1hcCIsIl9wYXRoIiwiX2N1cnJlbnRfdmVyc2lvbiIsInJhdyIsImxvYWQiLCJuYW1lIiwiaW5kZXhfbmFtZSIsImhhcyIsImRlbGV0ZSIsInNlY3JldHMiLCJpbmRleCIsImZvckVhY2giLCJpIiwic2V0IiwidmVyc2lvbiIsInJlYWRGaWxlU3luYyIsImZpbGUiLCJzZWNyZXQiLCJqb2luIiwiZ2V0IiwiRXJyb3IiLCJ2Il0sInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvcmUvc2VydmljZXMvU2VjcmV0TWFuYWdlclNlcnZpY2UudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMnO1xuXG5pbXBvcnQgeyByZWFkQWxsIH0gZnJvbSAnQC91dGlscy9pbmRleGVzJztcbmltcG9ydCB7IFZlcnNpb25lZEtleSB9IGZyb20gJ0AvdHlwZXMnO1xuXG5leHBvcnQgY2xhc3MgU2VjcmV0TWFuYWdl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"; | ||
export class SecretManagerService extends AbstractKeyManagerService {} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJBYnN0cmFjdEtleU1hbmFnZXJTZXJ2aWNlIiwiU2VjcmV0TWFuYWdlclNlcnZpY2UiXSwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29yZS9zZXJ2aWNlcy9TZWNyZXRNYW5hZ2VyU2VydmljZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBYnN0cmFjdEtleU1hbmFnZXJTZXJ2aWNlIH0gZnJvbSAnQC9jb3JlL3NlcnZpY2VzL0Fic3RyYWN0S2V5TWFuYWdlclNlcnZpY2UnO1xuXG5leHBvcnQgY2xhc3MgU2VjcmV0TWFuYWdlclNlcnZpY2UgZXh0ZW5kcyBBYnN0cmFjdEtleU1hbmFnZXJTZXJ2aWNlPEJ1ZmZlcj4ge31cbiJdLCJtYXBwaW5ncyI6IlNBQVNBLHlCQUF5QjtBQUVsQyxPQUFPLE1BQU1DLG9CQUFvQixTQUFTRCx5QkFBeUIsQ0FBUyIsImlnbm9yZUxpc3QiOltdfQ== |
@@ -5,2 +5,3 @@ import { generateSecret as generateSecretAES256, concatSecrets as concatSecretsAES256, prepareSecret as prepareSecretAES256, prepareEncryption as prepareEncryptionAES256, encrypt as encryptAES256, encryptStream as encryptStreamAES256, decrypt as decryptAES256, decryptStream as decryptStreamAES256 } from "./core/secrets/aes256.js"; | ||
export { KeyPairManagerService } from "./core/services/KeyPairManagerService.js"; | ||
export { AbstractKeyManagerService } from "./core/services/AbstractKeyManagerService.js"; | ||
export { SecretManagerService } from "./core/services/SecretManagerService.js"; | ||
@@ -34,2 +35,2 @@ export const ed25519 = { | ||
}; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJnZW5lcmF0ZVNlY3JldCIsImdlbmVyYXRlU2VjcmV0QUV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Rpb25zID0gUGFydGlhbDx7XG5cdGNvc3Q6IG51bWJlcjtcblx0YmxvY2tfc2l6ZTogbnVtYmVyO1xuXHRwYXJhbGxlbGl6YXRpb246IG51bWJlcjtcblx0a2V5X2xlbmd0aDogbnVtYmVyO1xuXHRzYWx0X2xlbmd0aDogbnVtYmVyO1xufT47XG5cbmV4cG9ydCB0eXBlIFZlcnNpb25lZEtleSA9IHsgZmlsZTogc3RyaW5nOyBuYW1lOiBzdHJpbmc7IHZlcnNpb246IG51bWJlciB9O1xuXG5leHBvcnQgdHlwZSBWZXJzaW9uZWRLZXlQYWlyID0ge1xuXHRzazogc3RyaW5nO1xuXHRwazogc3RyaW5nO1xuXHRuYW1lOiBzdHJpbmc7XG5cdHZlcnNpb246IG51bWJlcjtcbn07XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUtleU1hbmFnZXJTZXJ2aWNlPEtleVR5cGUgPSBCdWZmZXI+IHtcblx0bG9hZChpbmRleF9uYW1lPzogc3RyaW5nKTogUHJvbWlzZTx0cnVlPjtcblx0Z2V0KHZlcnNpb24/OiBudW1iZXIpOiBLZXlUeXBlO1xuXHRnZXQgbmFtZSgpOiBzdHJpbmc7XG5cdGdldCBjdXJyZW50X3ZlcnNpb24oKTogbnVtYmVyO1xufVxuIl0sIm1hcHBpbmdzIjoiIiwiaWdub3JlTGlzdCI6W119 |
/// <reference types="node" /> | ||
export declare class KeyPairManagerService { | ||
private _keypairs; | ||
private _current_version; | ||
private _path; | ||
constructor(abspath: string, current_version?: number); | ||
get raw(): Map<string, Map<number, { | ||
sk: Buffer; | ||
pk: Buffer; | ||
}>>; | ||
load(name: string, index_name?: string): Promise<true>; | ||
get(name: string, version?: number): Promise<{ | ||
sk: Buffer; | ||
pk: Buffer; | ||
}>; | ||
import { AbstractKeyManagerService } from '../../core/services/AbstractKeyManagerService.js'; | ||
export declare class KeyPairManagerService extends AbstractKeyManagerService<{ | ||
sk: Buffer; | ||
pk: Buffer; | ||
}> { | ||
load(index_name?: string): Promise<true>; | ||
} |
/// <reference types="node" /> | ||
export declare class SecretManagerService { | ||
private _secrets; | ||
private _current_version; | ||
private _path; | ||
constructor(abspath: string, current_version?: number); | ||
get raw(): Map<string, Map<number, Buffer>>; | ||
load(name: string, index_name?: string): Promise<true>; | ||
get(name: string, version?: number): Promise<Buffer>; | ||
import { AbstractKeyManagerService } from '../../core/services/AbstractKeyManagerService.js'; | ||
export declare class SecretManagerService extends AbstractKeyManagerService<Buffer> { | ||
} |
@@ -5,2 +5,3 @@ import { generateSecret as generateSecretAES256, concatSecrets as concatSecretsAES256, prepareSecret as prepareSecretAES256, prepareEncryption as prepareEncryptionAES256, encrypt as encryptAES256, encryptStream as encryptStreamAES256, decrypt as decryptAES256, decryptStream as decryptStreamAES256 } from './core/secrets/aes256.js'; | ||
export { KeyPairManagerService } from './core/services/KeyPairManagerService.js'; | ||
export { AbstractKeyManagerService } from './core/services/AbstractKeyManagerService.js'; | ||
export { SecretManagerService } from './core/services/SecretManagerService.js'; | ||
@@ -34,2 +35,2 @@ export declare const ed25519: { | ||
}; | ||
export type { AvailableMnemonicLanguage, GenerateMnemonicOptions, GenerateMnemonicSeedOptions, AvailableKeyPairAlgorithm, GenerateKeyPairOptions, GenerateSecretOptions, VersionedKey, VersionedKeyPair, } from './types/index.js'; | ||
export type { AvailableMnemonicLanguage, GenerateMnemonicOptions, GenerateMnemonicSeedOptions, AvailableKeyPairAlgorithm, GenerateKeyPairOptions, GenerateSecretOptions, VersionedKey, VersionedKeyPair, IKeyManagerService, } from './types/index.js'; |
@@ -47,1 +47,7 @@ /// <reference types="node" /> | ||
}; | ||
export interface IKeyManagerService<KeyType = Buffer> { | ||
load(index_name?: string): Promise<true>; | ||
get(version?: number): KeyType; | ||
get name(): string; | ||
get current_version(): number; | ||
} |
{ | ||
"name": "@piggly/secrets", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "An ESM/CommonJS library to better manage local secrets.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
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
53
260791
1742