1. Go to this page and download the library: Download units/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/ */
units / password example snippets
use Units\Password\Password;
$passwords = Password::create(['algorithm' => 'argon2id']);
$stored = $passwords->hash($password)->hash; // store this
$passwords->verify($password, $stored); // true
$passwords->verify('wrong', $stored); // false
// an application composing both units
$peppered = Hasher::create()->hmac($password, $pepper)->hash;
$stored = Password::create(['algorithm' => 'argon2id'])->hash($peppered)->hash;
$row = ['hash' => $stored, 'dna' => $passwords->dna()->toArray()];
Password::schema()->label(); // Password v1.0.0
Password::schema()->version(); // '1.0.0' - which scheme hashed this
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.