Socket
Book a DemoInstallSign in
Socket

passwordgen

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

passwordgen

Password generator for the command line

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

passwordgen.js

Generates passwords in the command line. Why passwordgen.js?

  • Makes phrase passwords as well as character passwords. See xkcd #936.
  • Word passwords are easier to type on mobile.

Install

npm install -g passwordgen

Usage

$ gen
ztht3JflLBzmbEu

$ gen --words 4
correct horse battery staple

$ gen --chars 10 --symbols
O_Rf-4qBOHmm

$ gen | xsel -ib   # linux
$ gen | pbcopy     # osx
# copies the password to clipboard

--help

Usage: gen [options]

Options:

  -h, --help          output usage information
  -w, --words <n>     generate <n> words
  -c, --chars <n>     generate <n> characters
  -s, --symbols       include symbols
  -S, --seed <seed>   use a seed value

Examples:

  $ gen         #=> EH8peEWVyYskuPh
  $ gen -c 5    #=> WsPnA
  $ gen -w 4    #=> correct horse battery staple

Programmatic usage

See index.js for all details.

var Passwordgen = require('passwordgen');
gen = new Passwordgen();

gen.phrase();       //=> "television pen card small"
gen.chars();        //=> "uAC4bGA0tXG"

gen.word();         //=> "kitten"
gen.words();        //=> ['hello', 'honey', 'mittens', 'score']

Also available:

gen.phrase(3);
gen.phrase({ symbols: true });
gen.phrase({ separator: '_' });

gen.words(3);
gen.words({ symbols: true });

gen.chars(10);
gen.chars(10, { letters: false });
gen.chars(10, { numbers: false });
gen.chars(10, { symbols: true });

License

© 2013, Rico Sta. Cruz. Released under the MIT License.

Keywords

password

FAQs

Package last updated on 26 May 2015

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