Giter VIP home page Giter VIP logo

ph-7 / passcode-password-generator Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 49 KB

๐Ÿค— A simple, secure & efficient way to generate passcodes and passwords for your PHP application ๐Ÿ”

Home Page: https://packagist.org/packages/ph-7/passcode-password-generator

License: MIT License

PHP 90.69% Shell 9.31%
php passcode passcode-generator password-generator random-password-generator random-password random-passcode-generator random-passcode passcode-generator-php password-generator-php

passcode-password-generator's Introduction

PHP Passcodes & Passwords Generator

๐Ÿ“„ Description

A simple, secure & clean way to generate random passcodes and passwords ๐Ÿ”‘

The library generates cryptographically secure random passwords and passcodes.

Ko Fi - Offer Me A Coffee

๐Ÿ›  Server Requirement

๐Ÿ›  Installation (with Composer)

composer require ph-7/passcode-password-generator

๐Ÿ“„ Usage

For Passcodes

use PH7\Generator\Passcode;

echo Passcode::generate(10); // Generate a 10-length passcode

By default, without argument, the function will generate a 6-character passcode.

use PH7\Generator\Passcode;

// By default, it generates a 6 length passcode
echo Passcode::generate();


// You can use the public `Passcode::DEFAULT_LENGTH` const, whcih also gives a 6-length passcode
echo Passcode::generate(Passcode::DEFAULT_LENGTH);

For Passwords

use PH7\Generator\Password;

echo Password::generate(16); // Generate a 16-length password

By default, generated passwords will contain special characters. You can disable them by mentioning the second argument to false

use PH7\Generator\Password;

// The password won't contain any special characters such as -, _, ~, |, %, ^, !, $, #, @, and ?
echo Password::generate(Password::DEFAULT_LENGTH, false);

Without argument, the function will generate a 12-character password.

use PH7\Generator\Password;

// By default, it generates a 12-length password
echo Password::generate();


// Password::DEFAULT_LENGTH also gives a 12-length password
echo Password::generate(Password::DEFAULT_LENGTH);

๐Ÿ˜‹ Who cooked it?

Pierre-Henry Soria

@phenrysay pH-7

Pierre-Henry Soria, a highly passionate, zen & pragmatic software engineer ๐Ÿ˜Š

โ˜•๏ธ Would like to help? Offer me a coffee, and boost the maintenance of this library! ๐Ÿ’ช

โš–๏ธ License

PHP Passcode/Password Generator is generously distributed under the MIT ๐ŸŽ‰

passcode-password-generator's People

Contributors

peter279k avatar ph-7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

passcode-password-generator's Issues

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.