Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <?php
  2. // app/Controller/Component/Auth/PrestaShopPasswordHasher.php
  3. App::uses('AbstractPasswordHasher', 'Controller/Component/Auth');
  4.  
  5. class PrestaShopPasswordHasher extends AbstractPasswordHasher {
  6.  
  7. // settings.inc.php _COOKIE_KEY_ constant of PrestaShop
  8. public $cookieKey = 'pfZPTPyV2INAWkcFvfFD3VoRzGQF3U0A7EfUZwNpEzCVWgtIX05tZNVY';
  9.  
  10. public function hash($password) {
  11. return md5($this->cookieKey . $password);
  12. }
  13.  
  14. public function check($password, $hashedPassword) {
  15. return $hashedPassword === $this->hash($password);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement