PHP code example of drmvc / password

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

    

drmvc / password example snippets



 = new \DrMVC\Password();

// Generate hash from string
$hash = $obj->make('some_pass');

// Get info about current hash
$info = $obj->info($hash);

// Verify if password is valid
$verify1 = $obj->verify('some_pass', $hash); // true
$verify2 = $obj->verify('other_pass', $hash); // false

// Check if rehashing is