tech dishoom tech dishoom - 4 days ago 6
MySQL Question

Which encryption method prestashop uses for password field and how?

Which encryption method prestashop uses for password field and how?
I want to encrypt the password field same as prestashop.
currently i am using this one.

$pass=md5($password);

Answer

From Tools.php

line 1180 (version 1.6.1.x)

public static function encrypt($passwd)
{
    return md5(_COOKIE_KEY_.$passwd);
}

line 1069 (version 1.7)

public static function hash($passwd)
{
    return md5(_COOKIE_KEY_.$passwd);
}

_COOKIE_KEY_ is defined in /config/settings.inc.php

Comments