1.0.0 • Published 11 months ago

yp-password-generator v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Password generator

Generates random passwords of different strength

Vertion

1.0.0

Install

$ npm install yp-password-generator

Usage

generate(mode, passLength, strong, preventDefaultLengthCheck)

Options

OptionTypeDefaultValueDescription
modestringsimpleDefine charSet used to generate password
passLengthnumber8Required password length
strongbooleanTRUEadd capital letters in charSet
preventDefaultLengthCheckbooleanFALSEPrevent generating password shorter than default value for specified mode

Values

mode = { "simple", "normal", "hard" }

defaultPasswordLength = { "simple": 8, "normal": 16, "hard": 32 }

charSets = { simple: "abcdefghijklmnopqrstuvwxyz", strong: "ABCDEFGHIJKLMNOPQRSTUVWXYZ", normal: "1234567890", hard: '~!@#$%^&*()_+<>?{}[]-=' }

Return

Returns a string of specified length and complicity.

1.0.0

11 months ago