public function read($data, array $options = []) {
		$class = $options['class'];

		$encrypted = $class::read(null, ['strategies' => false]);
		$key = isset($options['key']) ? $options['key'] : null;

		if (!isset($encrypted['__encrypted']) || !$encrypted['__encrypted']) {
			return isset($encrypted[$key]) ? $encrypted[$key] : null;
		}

		$current = $this->_decrypt($encrypted['__encrypted']);

		if ($key) {
			return isset($current[$key]) ? $current[$key] : null;
		} else {
			return $current;
		}
	}
public function read($data, array $options = []) {
		$class = $options['class'];

		$encrypted = $class::read(null, ['strategies' => false]);
		$key = isset($options['key']) ? $options['key'] : null;

		if (!isset($encrypted['__encrypted']) || !$encrypted['__encrypted']) {
			return isset($encrypted[$key]) ? $encrypted[$key] : null;
		}

		$current = $this->_decrypt($encrypted['__encrypted']);

		if ($key) {
			return isset($current[$key]) ? $current[$key] : null;
		} else {
			return $current;
		}
	}
public function read ( $ data , array $ options = [ ] ) { $ class = $ options [ 'class' ] ; $ encrypted = $ class :: read ( null , [ 'strategies' => false ] ) ; $ key = isset ( $ options [ 'key' ] ) ? $ options [ 'key' ] : null ; if ( ! isset ( $ encrypted [ '__encrypted' ] ) || ! $ encrypted [ '__encrypted' ] ) { return isset ( $ encrypted [ $ key ] ) ? $ encrypted [ $ key ] : null ; } $ current = $ this -> _decrypt ( $ encrypted [ '__encrypted' ] ) ; if ( $ key ) { return isset ( $ current [ $ key ] ) ? $ current [ $ key ] : null ; } else { return $ current ; } }
Read encryption method.

@param array $data the Data being read.
@param array $options Options for this method.
@return mixed Returns the decrypted key or the dataset.
Read encryption method .