public function fetchResult() { $result = parent::fetchResult(); $all = $result->getAll(); foreach ($all as $key => $row) { $all[$key] = array('key' => $row['key'], 'data' => $this->cypher->decrypt($row['data'], $this->symmetricKey)); } $result = new ArrayResult($all); return $result; }
/** * Encrypts the payload data. * * @param multitype $data the data to encrypt (must be serialized and base64 encoded) * @param string $key the key generated by <code>createKey()</code> * @return string the encrypted data */ private function encrypt($data, $key) { return $this->symmetricCypher->encrypt($data, $key); }