1. Go to this page and download the library: Download units/hasher 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 / hasher example snippets
use Units\Hasher\Hasher;
$hasher = Hasher::create(); // sha256, hex
$hasher->sha256('hello'); // 2cf24dba…b9824
$hasher->hmac('payload', $secret)->hash; // 0e7320e5…6ac3 — keyed
$hasher->compare($a, $b); // true — safe, use this not ===
$hasher->verify('hello', $known); // true — hashes, then compares
$hasher->hash($value)->hash; // store this
$hasher->verify($value, $stored); // check it later — true