Files
starter_template_ci_adminlte/application/helpers/app_helper.php
2024-01-08 09:33:24 +07:00

19 lines
458 B
PHP

<?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;
}
}