public function get() { if ($this->plaintext) { return $this->plaintext; } if ($this->tryToSetTokenFromDecorated()) { return json_decode($this->iron->decryptToken($this->token, $this->password), true); } }
public function fetch($id) { try { return $this->returnHit($this->callAndTime(function () use($id) { return json_decode($this->iron->decryptToken(Token::fromSealed($this->password, $this->decorated->fetch($id)), $this->password), true); })); } catch (Throwable $e) { return $this->returnMiss(false); } }