PHP code example of adgodev / xkpasswd-php
1. Go to this page and download the library: Download adgodev/xkpasswd-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/ */
adgodev / xkpasswd-php example snippets
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate();
// valuable=bear=difference=53
PasswordGenerator::generate([
'complexity' => 5,
'separators' => '#+-'
]);
// addition#wheat#congress#manner#lonely#20
PasswordGenerator::generate([
'wordList' => 'myWordList.json'
]);
// apple#grape#banana#40
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate();
// hide+threw+money+61
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate([
'complexity' => 5
]);
// join=industrial=wide=direction=lungs=16
PasswordGenerator::generate([
'complexity' => 6
]);
// 57!FIFTHLY!astronauts!AFFECTEDLY!nymphs!TRUSTLESSNESSES!06
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate([
'pattern' => 'wdwd'
]);
// adjective3solar6
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate([
'wordList' => 'myWordList.json'
]);
// orange.apple.banana
use Adgodev\Xkpasswd\PasswordGenerator;
PasswordGenerator::generate([
'wordList' => 'myWordList.txt'
]);
// kiwi-strawberry-grape
bash
composer