PHP code example of wuwx / laravel-hashing-md5
1. Go to this page and download the library: Download wuwx/laravel-hashing-md5 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/ */
wuwx / laravel-hashing-md5 example snippets
'driver' => 'md5',
use Illuminate\Support\Facades\Hash;
// 生成 MD5 哈希
$hashed = Hash::make('password');
// 验证密码
if (Hash::check('password', $hashed)) {
// 密码匹配
}
$hashed = Hash::driver('md5')->make('password');
$isValid = Hash::driver('md5')->check('password', $hashed);