/**
  * {@inheritDoc)
  */
 public function generate(TokenPoolInterface $tokenPool)
 {
     if (!$tokenPool->count()) {
         throw new \LogicException("Generate fingerprint on empty token pool it's not possible.");
     }
     $hashContext = hash_init($this->algorithm);
     /** @var $token TokenInterface */
     foreach ($tokenPool as $token) {
         hash_update($hashContext, serialize($token));
     }
     return hash_final($hashContext);
 }