protected function _encrypt($decrypted = []) {
		$vector = $this->_config['vector'];
		$secret = $this->_hashSecret($this->_config['secret']);

		mcrypt_generic_init(static::$_resource, $secret, $vector);
		$encrypted = mcrypt_generic(static::$_resource, serialize($decrypted));
		mcrypt_generic_deinit(static::$_resource);

		return base64_encode($encrypted) . base64_encode($vector);
	}
protected function _encrypt($decrypted = []) {
		$vector = $this->_config['vector'];
		$secret = $this->_hashSecret($this->_config['secret']);

		mcrypt_generic_init(static::$_resource, $secret, $vector);
		$encrypted = mcrypt_generic(static::$_resource, serialize($decrypted));
		mcrypt_generic_deinit(static::$_resource);

		return base64_encode($encrypted) . base64_encode($vector);
	}
protected function _encrypt ( $ decrypted = [ ] ) { $ vector = $ this -> _config [ 'vector' ] ; $ secret = $ this -> _hashSecret ( $ this -> _config [ 'secret' ] ) ; mcrypt_generic_init ( static :: $ _resource , $ secret , $ vector ) ; $ encrypted = mcrypt_generic ( static :: $ _resource , serialize ( $ decrypted ) ) ; mcrypt_generic_deinit ( static :: $ _resource ) ; return base64_encode ( $ encrypted ) . base64_encode ( $ vector ) ; }
Serialize and encrypt a given data array.

@param array $decrypted The cleartext data to be encrypted.
@return string A Base64 encoded and encrypted string.
Serialize and encrypt a given data array .