PHPMixBill v5.0 - First Upload
This commit is contained in:
34
system/autoload/Password.php
Normal file
34
system/autoload/Password.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Mikrotik Billing (www.phpmixbill.com)
|
||||
* Ismail Marzuqi <iesien22@yahoo.com>
|
||||
* @version 5.0
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @donate PayPal: iesien22@yahoo.com / Bank Mandiri: 130.00.1024957.4
|
||||
**/
|
||||
|
||||
Class Password{
|
||||
|
||||
public static function _crypt($password) {
|
||||
return crypt($password);
|
||||
}
|
||||
|
||||
public static function _verify($user_input, $hashed_password){
|
||||
if (crypt($user_input, $hashed_password) == $hashed_password) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static function _uverify($user_input, $hashed_password){
|
||||
if ($user_input == $hashed_password) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static function _gen(){
|
||||
$pass = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#!123456789', 8)), 0, 8);
|
||||
return $pass;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user