【发布时间】:2016-03-16 01:28:53
【问题描述】:
我需要将密码从magento迁移到opencart 2。我不知道magento到底是哪个版本,我认为它是v1。
在opencart中,负责加密的类是:AccountCustomer,存放在这个文件中:catalog/model/account/customer.php。插入方法:
class ModelAccountCustomer extends Model {
public function addCustomer($data) {
password = $this->db->escape(sha1($salt . sha1($salt . sha1($data['password']))))
在 opencart 数据库中,密码以这种格式存储(带有盐的 sha1):
密码=8f4a5752c2f91635ca8a3d6315cca1118e90f9ec
salt=Vln87Qkn3
在 magento 数据库中,password_hash 以这种语法存储。我认为盐是在:在这种情况下盐是:b0。加密算法可能是 md5,但我不确定。
密码哈希 = f1be538db8101e05def544c03357d958:b0
欢迎任何帮助!
【问题讨论】:
标签: php magento md5 sha1 opencart2.x