Files
databap/inc/auth.php
2014-06-14 18:04:27 +02:00

25 lines
414 B
PHP

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