mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
sha1
This commit is contained in:
parent
a2bd40f443
commit
5682aeb0b1
2 changed files with 237 additions and 233 deletions
|
@ -1,34 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
|
||||
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
**/
|
||||
**/
|
||||
|
||||
Class Password{
|
||||
class Password
|
||||
{
|
||||
|
||||
public static function _crypt($password) {
|
||||
return crypt($password);
|
||||
public static function _crypt($password)
|
||||
{
|
||||
return sha1($password);
|
||||
}
|
||||
|
||||
public static function _verify($user_input, $hashed_password){
|
||||
if (crypt($user_input, $hashed_password) == $hashed_password) {
|
||||
public static function _verify($user_input, $hashed_password)
|
||||
{
|
||||
if (sha1($user_input) == $hashed_password) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static function _uverify($user_input, $hashed_password){
|
||||
public static function _uverify($user_input, $hashed_password)
|
||||
{
|
||||
if ($user_input == $hashed_password) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static function _gen(){
|
||||
public static function _gen()
|
||||
{
|
||||
$pass = substr(str_shuffle(str_repeat('ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#!123456789', 8)), 0, 8);
|
||||
return $pass;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue