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

mongoose-field-encryption

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-field-encryption - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

16

lib/mongoose-field-encryption.js

@@ -67,3 +67,5 @@ "use strict";

// @ts-ignore
const iv = new Buffer.from(encryptedArray[0], "hex");
// @ts-ignore
const encrypted = new Buffer.from(encryptedArray[1], "hex");

@@ -253,2 +255,16 @@ const decipher = crypto.createDecipheriv(algorithm, secret, iv);

schema.pre("insertMany", function (_next, docs) {
const next = getCompatitibleNextFunc(_next);
try {
for (let doc of docs) {
encryptFields(doc, fieldsToEncrypt, secret());
}
next();
} catch (err) {
next(err);
}
});
schema.pre("findOneAndUpdate", updateHook);

@@ -255,0 +271,0 @@

8

package.json
{
"name": "mongoose-field-encryption",
"version": "6.0.0",
"version": "6.1.0",
"description": "A simple symmetric encryption plugin for individual fields. Dependency free, only mongoose peer dependency.",

@@ -56,5 +56,5 @@ "main": "lib/mongoose-field-encryption.js",

"nyc": "15.1.0",
"release-it": "15.6.0",
"sinon": "15.0.1",
"typescript": "4.9.4"
"release-it": "15.10.3",
"sinon": "15.0.4",
"typescript": "5.0.4"
},

@@ -61,0 +61,0 @@ "release-it": {

@@ -21,4 +21,4 @@ # mongoose-field-encryption

- Node `>=6` (Use `2.3.4` for Node `>=4.4.7 && <=6.x.x`)
- MongoDB `>=2.6.10`
- Node `>=12` (Use `2.3.4` for Node `>=4.4.7 && <6.x.x`, `5.0.3` for Node `>=6.x.x && <=10.x.x`)
- MongoDB `>=4.4`
- Mongoose `>=4.0.0`

@@ -253,2 +253,7 @@

### 6.1.0
- Add support for `insertMany`.
- Update dev dependencies.
### 6.0.0

@@ -255,0 +260,0 @@

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