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

mongoose-encryption

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-encryption - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

10

CHANGELOG.md
# Release Notes
## v.1.2.2
2015-11-4
- Fix buffer handling for Node 4.x compatibility
## v.1.2.1
2015-8-31
- Fix authentication when adding or removing a child from a subcollection
## v.1.2.0

@@ -3,0 +13,0 @@ 2015-08-16

6

index.js

@@ -47,2 +47,3 @@ 'use strict';

buf.copy(buf256, 0, 0, 32);
clearBuffer(buf);

@@ -377,5 +378,6 @@ return buf256;

if (this._ct) {
ctWithIV = this._ct.buffer || this._ct;
ctWithIV = this._ct.hasOwnProperty('buffer') ? this._ct.buffer : this._ct;
iv = ctWithIV.slice(VERSION_LENGTH, VERSION_LENGTH + IV_LENGTH);
ct = ctWithIV.slice(VERSION_LENGTH + IV_LENGTH, ctWithIV.length);
decipher = crypto.createDecipheriv(ENCRYPTION_ALGORITHM, encryptionKey, iv);

@@ -439,3 +441,3 @@ try {

}
var acBuf = this._ac.buffer || this._ac;
var acBuf = this._ac.hasOwnProperty('buffer') ? this._ac.buffer : this._ac;
if (acBuf.length < VERSION_LENGTH + AAC_LENGTH + 2) {

@@ -442,0 +444,0 @@ throw new Error('_ac is too short and has likely been cut off or modified');

{
"name": "mongoose-encryption",
"description": "Simple encryption and authentication plugin for Mongoose",
"version": "1.2.1",
"version": "1.2.2",
"author": {

@@ -31,3 +31,3 @@ "name": "Joe Goldbeck"

"dotty": "0.0.2",
"mongoose": "~4.1.x",
"mongoose": ">=4.2.4",
"underscore": "1.5.x",

@@ -34,0 +34,0 @@ "buffer-equal-constant-time": "1.0.1",

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