PHP code example of florianeckerstorfer / passwordplease-php

1. Go to this page and download the library: Download florianeckerstorfer/passwordplease-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

florianeckerstorfer / passwordplease-php example snippets


use Fe\PasswordPlease\PasswordPlease;

$factory = new \RandomLib\Factory;
$generator = $factory->getGenerator(new \SecurityLib\Strength(\SecurityLib\Strength::MEDIUM));

$pp = new PasswordPlease($generator);
$password = $pp->generatePassword(30, PasswordPlease::COMPLEXITY_HIGH);
shell
$ git clone https://github.com/florianeckerstorfer/passwordplease-php
$ cd password-please-php
$ php bin/password-please.php gen
shell
$ php password-please.phar gen --length=30 --complexity=3