/** * Key rotation method -- decrypt with your old key then re-encrypt with your new key * * @param string $hashedValue * @param \Defuse\Crypto\Key $newKey * * @return string */ public function shouldRecreate(string $hashedValue, Key $newKey) : string { return PasswordLock::rotateKey($hashedValue, $this->key, $newKey); }