Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@withdouble/lucipher

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@withdouble/lucipher - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

12

lib/abstract-jwt.js

@@ -6,7 +6,7 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _jsonwebtoken = _interopRequireDefault(require("jsonwebtoken"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -44,3 +44,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

});
return _jsonwebtoken.default.sign(payload, this.secretOrPrivateKey, signOptions);
return _jsonwebtoken["default"].sign(payload, this.secretOrPrivateKey, signOptions);
}

@@ -55,3 +55,3 @@ }, {

try {
var _jwt$verify = _jsonwebtoken.default.verify(message, this.secretOrPublicKey, verifyOptions),
var _jwt$verify = _jsonwebtoken["default"].verify(message, this.secretOrPublicKey, verifyOptions),
data = _jwt$verify.data;

@@ -81,3 +81,3 @@

var payload = _jsonwebtoken.default.decode(message);
var payload = _jsonwebtoken["default"].decode(message);

@@ -91,2 +91,2 @@ return payload && payload[claim];

exports.default = AbstractJwt;
exports["default"] = AbstractJwt;

@@ -6,7 +6,7 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _abstractJwt = _interopRequireDefault(require("./abstract-jwt"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -49,4 +49,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

return AsymmetricJwt;
}(_abstractJwt.default);
}(_abstractJwt["default"]);
exports.default = AsymmetricJwt;
exports["default"] = AsymmetricJwt;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -79,2 +79,2 @@ var _crypto = require("crypto");

exports.default = Authentication;
exports["default"] = Authentication;

@@ -9,3 +9,3 @@ "use strict";

get: function get() {
return _authentication.default;
return _authentication["default"];
}

@@ -16,3 +16,3 @@ });

get: function get() {
return _symmetricCipher.default;
return _symmetricCipher["default"];
}

@@ -23,3 +23,3 @@ });

get: function get() {
return _symmetricJwt.default;
return _symmetricJwt["default"];
}

@@ -30,3 +30,3 @@ });

get: function get() {
return _asymmetricJwt.default;
return _asymmetricJwt["default"];
}

@@ -43,2 +43,2 @@ });

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -13,3 +13,3 @@ var _crypto = require("crypto");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -55,3 +55,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

this.outputEncoding = outputEncoding || DEFAULT_ENCODING;
this.authentication = new _authentication.default({
this.authentication = new _authentication["default"]({
secret: this.authenticationSecret,

@@ -73,3 +73,3 @@ outputEncoding: 'buffer'

iv, // Cipher Data
cipher.update(plaintext, 'utf8'), cipher.final()]); // Compute authentication for ciphertext
cipher.update(plaintext, 'utf8'), cipher["final"]()]); // Compute authentication for ciphertext

@@ -103,3 +103,3 @@ var authentication = this.authentication.sign(ciphertext, authenticationMetas); // Prepend authentication to plaintext. $FlowFixMe

try {
plaintext = Buffer.concat([decipher.update(cipherData), decipher.final()]).toString('utf8');
plaintext = Buffer.concat([decipher.update(cipherData), decipher["final"]()]).toString('utf8');
} catch (err) {

@@ -126,2 +126,2 @@ return null;

exports.default = SymmetricCipher;
exports["default"] = SymmetricCipher;

@@ -6,7 +6,7 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _abstractJwt = _interopRequireDefault(require("./abstract-jwt"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -48,4 +48,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

return SymmetricJwt;
}(_abstractJwt.default);
}(_abstractJwt["default"]);
exports.default = SymmetricJwt;
exports["default"] = SymmetricJwt;
{
"name": "@withdouble/lucipher",
"description": "Encryption and JWT toolbox",
"version": "1.2.2",
"version": "1.2.3",
"author": {
"name": "Pierre-Elie Fauché",
"email": "pierre-elie@withdouble.com"
"name": "Double, inc",
"email": "engineering@withdouble.com"
},

@@ -23,3 +23,5 @@ "bugs": {

"scripts": {
"build": "rm -r lib && babel src/ -d lib/",
"clean-lib": "rm -rf lib | echo \"No lib folder to remove\"",
"prebuild": "npm run clean-lib",
"build": "babel src/ -d lib/",
"prepare": "npm run build"

@@ -35,4 +37,4 @@ },

"@babel/preset-flow": "^7.0.0",
"@withdouble/eslint-config": "^1.2.7",
"flow-bin": "^0.79.1"
"@withdouble/eslint-config": "^2.3.0",
"flow-bin": "^0.108.0"
},

@@ -39,0 +41,0 @@ "eslintConfig": {

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