PHP code example of org_heigl / password

1. Go to this page and download the library: Download org_heigl/password 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/ */

    

org_heigl / password example snippets


$password = Password::createFromPlainText($request->getParam('password'));
// Do not forget to remove the password from your request-object!!
$request->setParam('password', '*****');

$password->matchesHash($hashFromPhpPasswordHashingApi);

$hash = $password->getNewHash();

$password->shouldBeRehashed();

$password->hash($algorithm, $options);

$plaintextPassword = $password->getPlainTextPasswordAndYesIKnowWhatIAmDoingHere();