PHP code example of oh86 / laravel-hash-sm

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

    

oh86 / laravel-hash-sm example snippets


return [
    'driver' => 'localHmacSm3', // localHmacSm3, telecomHmacSm3, unicomHmacSm3, gdmobileHmacSm3
];

$en = Hash::driver('localHmacSm3')->make('123456');
/** @var bool */
$result = Hash::driver('localHmacSm3')->check('123456', $en);