]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/GroupBundle/Service/Sha256Salted.php
Fixed typos
[github/wallabag/wallabag.git] / src / Wallabag / GroupBundle / Service / Sha256Salted.php
CommitLineData
2041810a
TC
1<?php
2
3namespace Strut\StrutBundle\Service;
4
5use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
6
7class Sha256Salted implements PasswordEncoderInterface
8{
9 public function encodePassword($raw, $salt)
10 {
2585953e 11 return hash('sha256', $salt.$raw); // Custom function for password encrypt
2041810a
TC
12 }
13
14 public function isPasswordValid($encoded, $raw, $salt)
15 {
16 return $encoded === $this->encodePassword($raw, $salt);
17 }
18}