Exemple #1
0
 /**
  * Replace strange \000 character
  *
  * {@inheritdoc}
  */
 public function decrypt($string, $key = null)
 {
     $password = parent::decrypt($string, $key);
     /**
      * Unknown bug in PhpStorm
      * Only PHPStorm adds \0 to the tail of password
      * Perhaps PHP versions conflict
      */
     return rtrim($password, "");
 }
Exemple #2
0
 /**
  * Encrypt password
  *
  * @param string $password
  * @return string
  */
 protected function encrypt($password)
 {
     $crypter = new Crypter();
     return $crypter->encrypt($password);
 }