Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
Diabete
/
04
/
backend
/
Utils
:
PasswordHash.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php /* * This file is part of the FileGator package. * * (c) Milos Stojanovic <alcalbg@gmail.com> * * For the full copyright and license information, please view the LICENSE file */ namespace Filegator\Utils; /** * @codeCoverageIgnore */ trait PasswordHash { public static function hashPassword($value) { $hash = password_hash($value, PASSWORD_BCRYPT); if ($hash === false) { throw new \Exception('Bcrypt hashing not supported.'); } return $hash; } public static function verifyPassword($value, $hash) { return password_verify($value, $hash); } }