diff --git a/libraries/Cipher/CrazyCrypt1.class.php b/libraries/Cipher/CrazyCrypt1.class.php index fb0872a4..75a87c60 100644 --- a/libraries/Cipher/CrazyCrypt1.class.php +++ b/libraries/Cipher/CrazyCrypt1.class.php @@ -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); diff --git a/libraries/Cipher/EncryptInterface.class.php b/libraries/Cipher/EncryptInterface.class.php index 974c8195..83922afd 100644 --- a/libraries/Cipher/EncryptInterface.class.php +++ b/libraries/Cipher/EncryptInterface.class.php @@ -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 = ""); } diff --git a/libraries/Cipher/MD5.class.php b/libraries/Cipher/MD5.class.php index 42195281..c26f7bca 100644 --- a/libraries/Cipher/MD5.class.php +++ b/libraries/Cipher/MD5.class.php @@ -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; } diff --git a/libraries/Cipher/SALTED2MD5.class.php b/libraries/Cipher/SALTED2MD5.class.php index 4e12435e..1ceb8a30 100644 --- a/libraries/Cipher/SALTED2MD5.class.php +++ b/libraries/Cipher/SALTED2MD5.class.php @@ -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; } diff --git a/libraries/Cipher/SHA256.class.php b/libraries/Cipher/SHA256.class.php index e231347a..d49ca7f2 100644 --- a/libraries/Cipher/SHA256.class.php +++ b/libraries/Cipher/SHA256.class.php @@ -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; }