public function encodeResponse($response) { $serialized = json_encode($response, true); $encrypter = new \Encryption\Encrypter($this->encryptionKey); $response = $encrypter->encode($serialized); return $response; }
public function decodeResponse($encoded) { $encrypter = new \Encryption\Encrypter($this->encryptionKey); $decoded = json_decode($encrypter->decode($encoded), true); return $decoded; }