first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
if (!function_exists('get_hash')) {
|
||||
function get_hash($PlainPassword)
|
||||
{
|
||||
$option = ['cost' => 5];
|
||||
return password_hash($PlainPassword, PASSWORD_DEFAULT, $option);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('hash_verified')) {
|
||||
function hash_verified($PlainPassword, $HashPassword)
|
||||
{
|
||||
return password_verify($PlainPassword, $HashPassword) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user