Reputation: 73
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);
Upvotes: 2
Views: 14794
Reputation: 15
After doing what Vividus says, you have to execute this query in phpmyadmin:
UPDATE ps_employee SET passwd=md5("COOKIE_KEY+Your_new_pass")
WHERE email="email_user
The "plus" sign does not go inside the quotes, it's all together COOKIE_KEY
and your new password.
Upvotes: 1
Reputation: 226
In 1.6 _COOKIE_KEY_
is defined in /config/settings.inc.php
In 1.7 it is generated from this file /config/bootstrap.php
but stored here /app/config/parameters.php
If you are trying to insert directly in database than select md5 first than paste _COOKIE_KEY_
and type password.
Upvotes: 6
Reputation: 4337
From Tools.php
public static function encrypt($passwd)
{
return md5(_COOKIE_KEY_.$passwd);
}
public static function hash($passwd)
{
return md5(_COOKIE_KEY_.$passwd);
}
In 1.6 _COOKIE_KEY_
is defined in /config/settings.inc.php
In 1.7 it's defined in /config/bootstrap.php
Upvotes: 14