diff --git a/libraries/Encryption/CrazyCrypt1.class.php b/libraries/Cipher/CrazyCrypt1.class.php similarity index 100% rename from libraries/Encryption/CrazyCrypt1.class.php rename to libraries/Cipher/CrazyCrypt1.class.php diff --git a/libraries/Encryption/EncryptInterface.class.php b/libraries/Cipher/EncryptInterface.class.php similarity index 100% rename from libraries/Encryption/EncryptInterface.class.php rename to libraries/Cipher/EncryptInterface.class.php diff --git a/libraries/Encryption/MD5.class.php b/libraries/Cipher/MD5.class.php similarity index 100% rename from libraries/Encryption/MD5.class.php rename to libraries/Cipher/MD5.class.php diff --git a/libraries/Encryption/SALTED2MD5.class.php b/libraries/Cipher/SALTED2MD5.class.php similarity index 100% rename from libraries/Encryption/SALTED2MD5.class.php rename to libraries/Cipher/SALTED2MD5.class.php diff --git a/libraries/Encryption/SHA256.class.php b/libraries/Cipher/SHA256.class.php similarity index 100% rename from libraries/Encryption/SHA256.class.php rename to libraries/Cipher/SHA256.class.php diff --git a/libraries/Database/AuthmeDatabase.class.php b/libraries/Database/AuthmeDatabase.class.php index 6a249ff8..2c7f2bff 100644 --- a/libraries/Database/AuthmeDatabase.class.php +++ b/libraries/Database/AuthmeDatabase.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-03-13 11:59:32 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 15:19:38 + * @Last Modified time: 2016-04-03 15:41:39 */ namespace Database; @@ -25,7 +25,7 @@ class AuthmeDatabase extends AdaptedDatabase // generate random salt $salt = \Utils::generateRndString(16); } - $class_name = "Encryption\\".\Option::get('encryption'); + $class_name = "Cipher\\".\Option::get('encryption'); $encrypt = '$SHA$'.$salt.'$'. $class_name::encrypt($raw_passwd, $salt); return $encrypt; } diff --git a/libraries/Database/CrazyDatabase.class.php b/libraries/Database/CrazyDatabase.class.php index 5ce3021b..a1788759 100644 --- a/libraries/Database/CrazyDatabase.class.php +++ b/libraries/Database/CrazyDatabase.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-03-13 12:15:08 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 15:31:54 + * @Last Modified time: 2016-04-03 15:41:39 */ namespace Database; @@ -18,7 +18,7 @@ class CrazyDatabase extends AdaptedDatabase * https://github.com/ST-DDT/CrazyLogin/blob/master/php/Encryptors/CrazyCrypt1.php */ public function encryptPassword($raw_passwd, $username="") { - $class_name = "Encryption\\".\Option::get('encryption'); + $class_name = "Cipher\\".\Option::get('encryption'); return $class_name::encrypt($raw_passwd, $username); } diff --git a/libraries/Database/Database.class.php b/libraries/Database/Database.class.php index f3b61c28..48afa936 100644 --- a/libraries/Database/Database.class.php +++ b/libraries/Database/Database.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-02-02 21:59:06 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 15:36:27 + * @Last Modified time: 2016-04-03 15:41:40 */ namespace Database; @@ -124,7 +124,7 @@ class Database implements PasswordInterface, SyncInterface } public function encryptPassword($raw_passwd, $username = "") { - $class_name = "Encryption\\".\Option::get('encryption'); + $class_name = "Cipher\\".\Option::get('encryption'); return $class_name::encrypt($raw_passwd); } diff --git a/libraries/Database/DiscuzDatabase.class.php b/libraries/Database/DiscuzDatabase.class.php index 82494391..5790148b 100644 --- a/libraries/Database/DiscuzDatabase.class.php +++ b/libraries/Database/DiscuzDatabase.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-03-13 14:59:32 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 15:24:30 + * @Last Modified time: 2016-04-03 15:41:40 */ namespace Database; @@ -17,7 +17,7 @@ class DiscuzDatabase extends AdaptedDatabase */ public function encryptPassword($raw_passwd, $username="") { $salt = $this->select($this->column_uname, $username, null, $this->data_table)['salt']; - $class_name = "Encryption\\".\Option::get('encryption'); + $class_name = "Cipher\\".\Option::get('encryption'); return $class_name::encrypt($raw_passwd, $salt); }