Weighted (loosely) password generator module for JavaScript
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
src
.gitignore
Gruntfile.js
LICENSE
README.md
package.json

README.md

weighted-password-generator

Weighted (loosely) password generator module for JavaScript

// Adding a new character class
var accentedChars = new WeightedPasswordGen.charClass("àçèêé");  // Make sure you specify UTF8 encoding if you try this example
accentedChars.weight = 50;
WeightedPasswordGen.charClasses["accentedChars"] = accentedChars;

// Modifying the password length
WeightedPasswordGen.setPasswordLength(8);

// Modifying an included character class
WeightedPasswordGen.charClasses["lowerLetters"].enabled = false;

// Generating a password
var newPassword = WeightedPasswordGen.genPassword();