public function testDecryptData() { $crypt = new Crypt($this->secret); $encryptedData = $crypt->encrypt($this->plaintext); $decryptedData = $crypt->decrypt($encryptedData); $this->assertEquals($this->plaintext, $decryptedData); }
/** * Decrypt the session value. * * @param mixed $value * @return mixed */ protected function decrypt($value) { if ($this->crypt instanceof Crypt) { return $this->crypt->decrypt($value); } return $value; }