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