tech dishoom tech dishoom - 4 days ago 6
MySQL Question

Which encryption method does Prestashop use for the password field and how does it do it?

Which encryption method does Prestashop use for the password field and how does it do it?
I want to encrypt the password field using the same technique 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