summaryrefslogtreecommitdiffstats
path: root/Encoder/PasswordEncoderInterface.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2010-10-19 13:06:43 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2010-10-19 13:33:17 +0200
commit3fec93d3ff1f6a31f078e5558a15a75539bf5185 (patch)
tree1a6229643289d9d0ca55871bab9497035a6e49f1 /Encoder/PasswordEncoderInterface.php
downloadsymfony-security-3fec93d3ff1f6a31f078e5558a15a75539bf5185.zip
symfony-security-3fec93d3ff1f6a31f078e5558a15a75539bf5185.tar.gz
symfony-security-3fec93d3ff1f6a31f078e5558a15a75539bf5185.tar.bz2
added the Security Component and its integration into the MVC framework
Happy birthday symfony!
Diffstat (limited to 'Encoder/PasswordEncoderInterface.php')
-rw-r--r--Encoder/PasswordEncoderInterface.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/Encoder/PasswordEncoderInterface.php b/Encoder/PasswordEncoderInterface.php
new file mode 100644
index 0000000..c81ec25
--- /dev/null
+++ b/Encoder/PasswordEncoderInterface.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace Symfony\Component\Security\Encoder;
+
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * PasswordEncoderInterface is the interface for all encoders.
+ *
+ * @author Fabien Potencier <fabien.potencier@symfony-project.com>
+ */
+interface PasswordEncoderInterface
+{
+ /**
+ * Encodes the raw password.
+ *
+ * @param string $raw The password to encode
+ * @param stirng $salt The salt
+ *
+ * @return string The encoded password
+ */
+ function encodePassword($raw, $salt);
+
+ /**
+ * Checks a raw password against an encoded password.
+ *
+ * @param string $encoded An encoded password
+ * @param string $raw A raw password
+ * @param string $salt The salt
+ *
+ * @return Boolean true if the password is valid, false otherwise
+ */
+ function isPasswordValid($encoded, $raw, $salt);
+}