@relaycorp/webcrypto-kms
Version:
WebCrypto-compatible client for Key Management Services like GCP KMS
24 lines • 839 B
JavaScript
;
// tslint:disable:max-classes-per-file
Object.defineProperty(exports, "__esModule", { value: true });
exports.RsaPssPrivateKey = exports.PrivateKey = void 0;
const webcrypto_core_1 = require("webcrypto-core");
class PrivateKey extends webcrypto_core_1.CryptoKey {
constructor(algorithm, provider) {
super();
this.algorithm = algorithm;
this.provider = provider;
this.extractable = true;
this.type = 'private';
}
}
exports.PrivateKey = PrivateKey;
class RsaPssPrivateKey extends PrivateKey {
constructor(hashingAlgorithm, provider) {
const algorithm = { name: 'RSA-PSS', hash: { name: hashingAlgorithm } };
super(algorithm, provider);
this.usages = ['sign'];
}
}
exports.RsaPssPrivateKey = RsaPssPrivateKey;
//# sourceMappingURL=PrivateKey.js.map