0

I am migrating customers from CS-Cart to Magento 1. But I am not getting how can I migrate customers password.

As Magento1 uses md5 and also cs-cart uses md5, but cs cart uses it with salt.

I know salted hash and also salt, but not getting how to get md5 string with salt and salted hash.

update customer_entity_varchar set value = md5('testtest') where entity_id=$customer_entity_id and attribute_id in (select attribute_id from eav_attribute where attribute_code = 'password_hash' and entity_type_id = 1);

using this we can import plain md5 in magento1. But I am not getting how to get md5 without salt from salt and md5 salted.

Please help

1

The short answer, is that you can't. If it were possible to somehow derive the bare md5 hash from the salted hash and salt, it would completely negate all the security improvements that the salt provides.

However, At least as of Magento 1.7, Magento does use a salt with md5 passwords. I'm not sure how CS-Cart does it, but in Magento, both the hash and the salt are stored in the "password_hash" field in the form saltedhash:hash so it could look something like 8d370abccde202754b76e1b932dcf287:Q4, where 8d370abccde202754b76e1b932dcf287 is the salted hash, and Q4 is the salt. If you have both the salted hash and hash, you could try combining them with a colon and inserting them into that field.

0

Magento also use salt to generate MD5 hash. Not sure how CS cart is doing that.

I suggest building a module in magento which overrides Magento authentication method and allow both CS cart type encrypted hash and Magento type encrypted hash passwords. This way you can be 100% sure that all CS cart customers can login without any issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.