encryptionAlgorithm->setPassword($password); } if (!$this->encryptionAlgorithm->loadKey($key)) { throw new InvalidArgumentException('Invalid key supplied.'); } return $this->encryptionAlgorithm->sign($input); } /** * {@inheritdoc} */ public function verify($key, $signature, $input) { if (!$this->encryptionAlgorithm->loadKey($key)) { throw new InvalidArgumentException('Invalid key supplied.'); } return $this->encryptionAlgorithm->verify($input, $signature); } }