renamed Encryption to Cipher
This commit is contained in:
parent
1b76f33e0b
commit
532ba30e99
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user