12,14 → 12,14 |
*/ |
|
class Security extends Core { |
function __construct() { |
public function __construct() { |
} |
|
function checkInt($value) { |
public function checkInt($value) { |
return abs(intval($value)); |
} |
|
function checkStr($value, $mode = 0) { |
public function checkStr($value, $mode = 0) { |
// mode - 0 -> wrap; mode - 1 -> strip; |
if ($mode == 0) { |
$result = mysql_real_escape_string($value); |
30,7 → 30,7 |
} |
|
// генерация хеша пароля |
function encryptStr($string) { |
public function encryptStr($string) { |
return md5(md5($string)."-CN-ANT-NG-".sha1($string)); |
} |
|