Coder Social home page Coder Social logo

passworder's Introduction

Human-friendly password generator

For Laravel 5.5

Generates password from 2 parts: first is random, but well-readable string, seocnd is a word from dictionary.

All options are in config file:

  • random_uppercase: make several letters uppercase [true/false]
  • uppercase_chance: chance to make letter uppercase. Applies for each letter. [0-9]
  • add_numbers: add or not numbers to password (to the end of both parts). [true/false]
  • number_chance: chance to add number [0-9]
  • words => [] : dictionary.

Install

1: install via composer:

composer require curiolabs/passworder

2: add service provider:

Open config/app.php, and add to the providers array:

CurioLabs\Passworder\PassworderServiceProvider::class,

3: add facade alias:

In the config/app.php. add to the aliases array:

'Passworder' => CurioLabs\Passworder\Facade\Passworder::class,

4: Publishing config:

Run in the console:

./artisan vendor:publish --provider="CurioLabs\Passworder\PassworderServiceProvider"

Config will be moved to /config/passworder.php

Usage examples:

Code:

for( $i=0; $i<10; $i++ ) {
      echo \Passworder::gen()."<br>";
  }

Config:

    'random_uppercase' => true,
    'uppercase_chance' => 1,        # 0-9
    'add_numbers' => true,
    'number_chance' => 5,           # 0-9
    'delimeters'  => '-_!@%.#',

Output:

sobmu.heat
Rupke4.print
bistO2-doubt
penga#agree
TambU8#papeR6
RamdA!woman
tebPU-sleep
dogke.wOuNd4
Todki!linen
nanrO.WoRk6

passworder's People

Contributors

curiolabs avatar ircop avatar rudenko-programmer avatar

Watchers

James Cloos avatar  avatar

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.