Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rajakodings committed Jan 26, 2020
1 parent d3c60df commit 574c680
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions system/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,27 @@ function csrf_validation() {
}
}

if(!function_exists('hash_check')) {
/**
* @param $input_password
* @param $hash_password
* @return bool
*/
function hash_check($input_password, $hash_password) {
return (boolean) password_verify(config('password_salt').$input_password, $hash_password);
}
}

if(!function_exists('hash_make')) {
/**
* @param $string_text
* @return bool|string
*/
function hash_make($string_text) {
return password_hash(config('password_salt').$string_text, PASSWORD_BCRYPT);
}
}

if(!function_exists("csrf_input")) {
function csrf_input() {
$hash = string_random();
Expand Down

0 comments on commit 574c680

Please sign in to comment.