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

secure-cookie

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-cookie - npm Package Compare versions

Comparing version 0.0.7 to 0.1.0

21

dist/index.esm.js
/*!
* secure-cookie v0.0.7
* secure-cookie v0.1.0
* (c) Ismail H. Ayaz

@@ -160,18 +160,13 @@ * Released under the MIT License.

opts = opts || {};
if (opts.encryption) {
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
throw new Error("keys are required for encryption");
}
}
if (opts.signing) {
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
throw new Error("keys are required for signing");
}
}
this.encryption = Object.assign({
algorithm: 'aes-192-ccm',
authTagLength: 16,
encoding: 'hex', keys: []
encoding: 'hex',
keys: []
}, opts.encryption || {});
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
this.signing = Object.assign({
encoding: 'base64',
algorithm: 'sha1',
keys: []
}, opts.signing || {});
}

@@ -178,0 +173,0 @@ KeyStore.prototype.encrypt = function (data, options) {

/*!
* secure-cookie v0.0.7
* secure-cookie v0.1.0
* (c) Ismail H. Ayaz

@@ -170,18 +170,13 @@ * Released under the MIT License.

opts = opts || {};
if (opts.encryption) {
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
throw new Error("keys are required for encryption");
}
}
if (opts.signing) {
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
throw new Error("keys are required for signing");
}
}
this.encryption = Object.assign({
algorithm: 'aes-192-ccm',
authTagLength: 16,
encoding: 'hex', keys: []
encoding: 'hex',
keys: []
}, opts.encryption || {});
this.signing = Object.assign({ encoding: 'base64', algorithm: 'sha1', keys: [] }, opts.signing || {});
this.signing = Object.assign({
encoding: 'base64',
algorithm: 'sha1',
keys: []
}, opts.signing || {});
}

@@ -188,0 +183,0 @@ KeyStore.prototype.encrypt = function (data, options) {

{
"name": "secure-cookie",
"version": "0.0.7",
"version": "0.1.0",
"description": "Cookie library/middleware with signing and encryption support",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -43,19 +43,15 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */

opts = opts || {}
if (opts.encryption) {
if (!Array.isArray(opts.encryption.keys) || opts.encryption.keys.length === 0) {
throw new Error("keys are required for encryption")
}
}
if (opts.signing) {
if (!Array.isArray(opts.signing.keys) || opts.signing.keys.length === 0) {
throw new Error("keys are required for signing")
}
}
this.encryption = Object.assign({
algorithm: 'aes-192-ccm',
authTagLength: 16,
encoding: 'hex', keys: []
encoding: 'hex',
keys: []
}, opts.encryption || {} as any)
this.signing = Object.assign({encoding: 'base64', algorithm: 'sha1', keys: []}, opts.signing || {} as any)
this.signing = Object.assign({
encoding: 'base64',
algorithm: 'sha1',
keys: []
}, opts.signing || {} as any)

@@ -62,0 +58,0 @@ }

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