mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-30 14:09:58 +08:00
fixed non-static method
This commit is contained in:
parent
fa44d65081
commit
d99ea35ce1
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-04-03 14:55:38
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-03 17:17:06
|
||||
* @Last Modified time: 2016-04-05 14:09:59
|
||||
*/
|
||||
|
||||
namespace Cipher;
|
||||
@ -15,7 +15,7 @@ class CrazyCrypt1 implements EncryptInterface
|
||||
*
|
||||
* https://github.com/ST-DDT/CrazyLogin/blob/master/php/Encryptors/CrazyCrypt1.php
|
||||
*/
|
||||
public function encrypt($raw_passwd, $salt = "") {
|
||||
public static function encrypt($raw_passwd, $salt = "") {
|
||||
// salt is username
|
||||
$text = "ÜÄaeut//&/=I " . $raw_passwd . "7421€547" . $salt . "__+IÄIH§%NK " . $raw_passwd;
|
||||
$t1 = unpack("H*", $text);
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-04-03 14:43:46
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-03 17:17:06
|
||||
* @Last Modified time: 2016-04-05 14:09:53
|
||||
*/
|
||||
|
||||
namespace Cipher;
|
||||
@ -17,5 +17,5 @@ interface EncryptInterface
|
||||
* @param string $salt
|
||||
* @return string, ecrypted password
|
||||
*/
|
||||
public function encrypt($raw_passwd, $salt = "");
|
||||
public static function encrypt($raw_passwd, $salt = "");
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-04-03 14:53:42
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-03 17:17:06
|
||||
* @Last Modified time: 2016-04-05 14:09:57
|
||||
*/
|
||||
|
||||
namespace Cipher;
|
||||
@ -13,7 +13,7 @@ class MD5 implements EncryptInterface
|
||||
/**
|
||||
* Once MD5 encrypt
|
||||
*/
|
||||
public function encrypt($raw_passwd, $salt = "") {
|
||||
public static function encrypt($raw_passwd, $salt = "") {
|
||||
$encrypt = md5($raw_passwd);
|
||||
return $encrypt;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-04-03 14:58:11
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-03 17:17:07
|
||||
* @Last Modified time: 2016-04-05 14:10:04
|
||||
*/
|
||||
|
||||
namespace Cipher;
|
||||
|
||||
class SALTED2MD5 implements EncryptInterface
|
||||
{
|
||||
public function encrypt($raw_passwd, $salt = "") {
|
||||
public static function encrypt($raw_passwd, $salt = "") {
|
||||
$encrypt = md5(md5($raw_passwd).$salt);
|
||||
return $encrypt;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Author: printempw
|
||||
* @Date: 2016-04-03 14:50:45
|
||||
* @Last Modified by: printempw
|
||||
* @Last Modified time: 2016-04-03 17:17:07
|
||||
* @Last Modified time: 2016-04-05 14:10:07
|
||||
*/
|
||||
|
||||
namespace Cipher;
|
||||
@ -15,7 +15,7 @@ class SHA256 implements EncryptInterface
|
||||
*
|
||||
* @see http://pastebin.com/1wy9g2HT
|
||||
*/
|
||||
public function encrypt($raw_passwd, $salt = "") {
|
||||
public static function encrypt($raw_passwd, $salt = "") {
|
||||
$encrypt = hash('sha256', hash('sha256', $raw_passwd).$salt);
|
||||
return $encrypt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user