/**
  * @param UserIdentifier $userIdentifier
  * @param Username       $username
  * @param HashedPassword $hashedPassword
  * @param \DateTime      $at
  */
 public function __construct(UserIdentifier $userIdentifier, Username $username, HashedPassword $hashedPassword, \DateTime $at)
 {
     $this->userIdentifier = $userIdentifier->toString();
     $this->username = $username->toString();
     $this->at = $at->format('UTC');
     $this->hashedPassword = $hashedPassword->toString();
 }
 /**
  * @param Password       $plain
  * @param HashedPassword $hashed
  *
  * @return bool
  */
 public function check(Password $plain, HashedPassword $hashed)
 {
     return password_verify($plain->toString(), $hashed->toString());
 }