v1.0.0 RC 1
This commit is contained in:
25
inc/auth.php
Normal file
25
inc/auth.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Auth Class
|
||||
* TODO move all auth related topics here
|
||||
* @author lutranf
|
||||
*
|
||||
*/
|
||||
class Auth
|
||||
{
|
||||
const ALGO = PASSWORD_DEFAULT;
|
||||
const COST = 12;
|
||||
|
||||
public static function HashPassword($sPass)
|
||||
{
|
||||
return password_hash($sPass, self::ALGO, array('cost'=>self::COST));
|
||||
}
|
||||
|
||||
public static function CheckPassword($sPass, $sHash)
|
||||
{
|
||||
return password_verify($sPass, $sHash);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user