Пример #1
0
 /**
  * @param UserInterface $entity
  * @param string $plaintext
  * @return bool
  */
 public function hashPassword(UserInterface $entity, $plaintext)
 {
     if ($this->isSamePasswordOption()) {
         return $this->gameDataService->isPasswordSame($entity->getPassword(), $plaintext);
     }
     $bcrypt = new Bcrypt();
     return $bcrypt->verify($plaintext, $entity->getPassword());
 }