PHP code example of jord-jd / password-suggester
1. Go to this page and download the library: Download jord-jd/password-suggester 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/ */
jord-jd / password-suggester example snippets
use JordJD\PasswordSuggester\PasswordSuggester;
use JordJD\PasswordSuggester\SuggestionStrategies\AlphanumericStrategy;
use JordJD\PasswordSuggester\SuggestionStrategies\NumbersStrategy;
use JordJD\PasswordSuggester\SuggestionStrategies\WordsStrategy;
$passwordSuggester = new PasswordSuggester(function ($password) {
return strlen($password) >= 20 && !myBreachServiceContains($password);
});
$passwordSuggester->setMaxAttempts(250);