PHP code example of trihydera / hashutils
1. Go to this page and download the library: Download trihydera/hashutils 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/ */
trihydera / hashutils example snippets
use Trihydera\Hashutils\HashID;
// Instantiate HashID class
$hashId = new HashID('mysalt');
// Generate a hashed ID
$generatedHash = $hashId->gen();
// Verify a hash
$isValid = $hashId->verify($generatedHash);
use Trihydera\Hashutils\HashText;
// Instantiate HashText class with a custom salt
$hashText = new HashText('mysalt');
// Generate a hashed string for the text "Hello, World!"
$hashedContent = $hashText->gen('Hello, World!');
echo $hashedContent;