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

moleculer-encryption-middleware

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer-encryption-middleware

WIP

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

WIP

Installation

npm i moleculer-encryption-middleware

Usage

// moleculer.config.js
import { encryptionMiddleware } from "moleculer-encryption-middleware";
//or with require
//const { encryptionMiddleware } = require("moleculer-encryption-middleware");

module.exports = {
  middlewares: [
      encryptionMiddleware({
          password: Buffer.from("67544A58287C12EB654D0B6C14A5B36EC5916BD5A31BD7AD8F5B826B7C35A7D8", "hex")
      })
  ]
};

Available options

  • password: Buffer | string | Uint8Array
    • need to be a 32 bytes long Buffer or a string that will be sha256 hashed
  • algorithm: string : algorithm to use for encryption (default: 'aes-256-cbc')
    • algorithm to use for encryption
  • IVPosition: number : initialization vector position
    • need to be the same for all nodes (more secure to specify it, better with a small value)
  • IVLength: number : length of the initialization vector (default: 16)
    • length of the initialization vector, mandatory for node < 15.x (16 for aes-256-cbc)

Keywords

FAQs

Package last updated on 21 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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