PHP code example of psecio / pwdcheck
1. Go to this page and download the library: Download psecio/pwdcheck 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/ */
psecio / pwdcheck example snippets
new \Psecio\Pwdcheck\Password();
$p->evaluate($password);
// getting the numeric representation:
echo 'Strength: '.$p->getStrength()."\n";
// getting the text version:
echo 'Strength: '.$p->getStrength(true)."\n";
// you can also get the raw score either as a return value or using getScore
$result = $p->evaluate($password);
echo 'Score: '.$result."\n"
echo 'Score: '.$p->getScore()."\n";