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

node-mpw

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-mpw

Implementation of Master Password for nodejs and browser

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

node-mpw

Implementation of Master Password for nodejs and browser

Installation

$ npm install --save node-mpw

Usage

import mpw from 'node-mpw'

generateKey

mpw.generateKey(name: string, password: string, version?: string, namespace?: string): Buffer

Calculate the master key from a user's name and master password.

Parameters
  • name: string The desired username.
  • password: string The desired master password.
  • version?: string The algorithm version being used for this process.
  • namespace? string The namespace used as a salt to calculate the key.

Returns: a key generated from the scrypt algorithm.

generatePassword

mpw.generatePassword(site: string, key: Buffer, counter?: number, template?: string, version?: number, namespace?: string): string

Encode a site password using the site's type template.

Parameters
  • site: string The site name. The bare domain name is an ideal choice.
  • key: Buffer An scrypt-hashed key generated from the generateKey() function.
  • counter?: number An integer that can be incremented when the user needs a new password for the site.
  • template?: string The password template that the user chooses.
  • version?: number The algorithm version being used for this process.
  • namespace?: string The namespace used as a salt to calculate the seed.

Returns: the final, generated password.

To-Do List

  • Clean up code and write documentation Done!
  • Refine algorithm & public API to make it compatible with Master Password app. Done!
  • Publish as npm package

Contributing

Issues and Pull Requests are welcome! Please read our contributing guidelines & code of conduct beforehand.

Reading the commit log

We use a few emojis as an identifier on what the commits are. The following commit naming scheme is loosely based on the Commitizen commit naming conventions. Feel free to use this standard as well.

  • :bulb: (bulb): Working on new features
  • :bug: (bug): Bug squashing
  • :memo: (memo): Working on documentation
  • :dash: (dash): Code style cleanup / linting / dusting / etc.
  • :construction: (construction): Large refactors or rewrites
  • :wrench: (wrench): Adding missing tests
  • :arrow_up: (arrow_up): Version bumps

Keywords

FAQs

Package last updated on 02 Mar 2017

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