PHP code example of krzysztofzylka / hash

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

    

krzysztofzylka / hash example snippets


\Krzysztofzylka\Hash\Hash::hash(string $string, string $algorithm = 'pbkdf2'): string

\Krzysztofzylka\Hash\Hash::checkHash(string $hash, string $string): bool

$hash = \Krzysztofzylka\Hash\Hash::hash('hash');
$checkHash = \Krzysztofzylka\Hash\Hash::checkHash($hash, 'hash');
$checkHash2 = \Krzysztofzylka\Hash\Hash::checkHash($hash, 'test');

var_dump(
    $hash, //$003$e661174850a6c7fcf99a
    $checkHash, //true
    $checkHash2 //false
);