简体   繁体   中英

Magento customer login with SHA1 password encryption

I have upload Customer with sha1() password encryption. But I think that Magento uses MD5 for password hashing. The problem is that we have already uploaded 100,000 customers - now they can not login. Is there a way to convert these sha1() passwords to MD5 or change the logic of Magento to use with sha1() rather than MD5?

To validate a customer password, it uses validatePassword function of Mage_Customer_Model_Customer class.

If we trace this function then it calls validateHash function of Mage_Core_Helper_Data class. And again it calls validateHash function of Mage_Core_Model_Encryption class to validate hash.

Here it calls hash function of Mage_Core_Model_Encryption class and it returns md5 encrypted data.

So here you can temporary change md5 with sha1 and check either it works or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM