Code Monkey home page Code Monkey logo

easy_passwords's Introduction

easy_passwords.rb

Build Status

easy_passwords.rb is a Ruby implementation of passwdqc's easy_passwords, a random pronouncable password generator.

Installation

gem install easy_passwords
#Gemfile
gem 'easy_passwords'

Goals

  • Passwords are easily to read
  • You can setup max password length in characters(useful when sending password in sms message)
  • You can define separators list

Usage

Ruby App

You can require it within your app:

require 'rubygems'
require 'easy_passwords'

p EasyPassword.generate             # => "employ7Royal"
p EasyPassword.generate 5           # => "Peach"
p EasyPassword.generate 7, '|'      # => "cat|eat"
p EasyPassword.generate 15          # => "soggy*Apart9Odd"
p EasyPassword.generate 2           # => raise error, min length is 3

gen = EasyPassword.new             # => #<EasyPasswords::Generator:0x9f6ec40 ...>
p gen.generate                     # => "employ7Royal"
p gen.generate 15                  # => "soggy*Apart9Odd"


my_gen = EasyPassword.new('|')  # => #<EasyPasswords::Generator:0x9f6ec40 ...>
p my_gen.generate               # => "employ|Royal"
p my_gen.generate 15            # => "soggy|Apart|Odd"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create new Pull Request

Credits

Legal

Licensed under the MIT license

easy_passwords's People

Contributors

iphoting avatar piotrze avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

wellinformed

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.