GithubHelp home page GithubHelp logo

ssokurenko / jquery-password-generator-plugin Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 3.0 19 KB

JQuery password generator plugin, demo:

Home Page: http://ssokurenko.github.io/jquery-password-generator-plugin/#

License: MIT License

JavaScript 50.16% HTML 49.84%

jquery-password-generator-plugin's Introduction

Password Generator jQuery Plugin

Fast jQuery plugin for generating strong random passwords.

Live DEMO

Password Generator Plugin

Download

Installation with Node Package Manger

npm install jquery-password-generator-plugin

Code will be available at the node_modules folder

You could also install it globally (use sudo if needed):

sudo npm install -g jquery-password-generator-plugin

Usage examples

Basic usage

$.passgen()
<script src="jquery.js"></script>
<script src="dist/jquery-password-generator-plugin.min.js"></script>
<script>

  $(document).ready(
    function(){
      alert('Generated password: ' + $.passGen());
    }
  );

</script>

Usage with custom options

$.passGen({'length' : 10, 'numeric' : true, 'lowercase' : true, 'uppercase' : true, 'special' : false})

You can redefined all or specific options:

Option Description Default value
length Number of characters 10
numbers Use numbers (0, 1, 2, etc...) true
lowercase Use lowercase letters (a, b, c, etc...) true
uppercase Use uppercase letters (A, B, C, etc...) true
special Use special characters (!, @, #, $, etc...) false

Local Project Setup

Install required npm mobules

sudo npm install

Install bower dependencies

bower install

Grunt commands

Run server

grunt serve

If everything goes OK, the server will be available at: http://localhost:7777

Tests can be found at: http://localhost:7777/test/jquery-password-generator-plugin.html

Run tests

grunt test

Test results will be available at the console

Building the project

grunt build

Generated files will be available at the dist folder:

dist/jquery.jquery-password-generator-plugin.js
dist/jquery.jquery-password-generator-plugin.min.js

License

MIT © Sergey Sokurenko

jquery-password-generator-plugin's People

Contributors

ssokurenko avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

jquery-password-generator-plugin's Issues

Security Vulnerability: Math.random()

The passwords are generated using Math.random(), which isn't a cryptographically-secure source of random numbers (at least not in most browsers). The problem here is that the passwords this library generates will be easier to predict/guess than passwords that are generated properly, and it might even be possible for a website open in a different tab to steal Math.random()'s state to learn the passwords being generated on a different website in a different tab (I'm not sure about this).

You'll want to use this: https://developer.mozilla.org/en-US/docs/Web/API/RandomSource/getRandomValues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.