/**
  * (non-PHPdoc)
  * @see \Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface::isPasswordValid()
  */
 public static function isPasswordValid(Password $password)
 {
     if (substr($password->getHash(), 0, 7) != '{crypt}') {
         return false;
     }
     $hash = substr($password->getHash(), 7);
     if (crypt($password->getPasswordPlain(), $hash) === $hash) {
         return true;
     }
     return false;
 }
 /**
  * (non-PHPdoc)
  * @see \Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface::isPasswordValid()
  */
 public static function isPasswordValid(Password $password)
 {
     $hash = $password->getHash();
     if (self::NTLMHash($password->getPasswordPlain()) === $hash) {
         return true;
     }
     return false;
 }