1 | <?php |
||
29 | class PasswordEncoder implements PasswordEncoderInterface |
||
|
|||
30 | { |
||
31 | |||
32 | /* @var $config array */ |
||
33 | public $config; |
||
34 | |||
35 | 1135 | public function __construct(array $config) |
|
39 | |||
40 | /** |
||
41 | * Encodes the raw password. |
||
42 | * |
||
43 | * @param string $raw The password to encode |
||
44 | * @param string $salt The salt |
||
45 | * |
||
46 | * @return string The encoded password |
||
47 | */ |
||
48 | 513 | public function encodePassword($raw, $salt) |
|
61 | |||
62 | /** |
||
63 | * Checks a raw password against an encoded password. |
||
64 | * |
||
65 | * @param string $encoded An encoded password |
||
66 | * @param string $raw A raw password |
||
67 | * @param string $salt The salt |
||
68 | * |
||
69 | * @return bool true if the password is valid, false otherwise |
||
70 | */ |
||
71 | 1 | public function isPasswordValid($encoded, $raw, $salt) |
|
96 | |||
97 | } |
||
98 |