ToDo: - Convert to zend_parse_parameters - Unify error handling - Implement encryption streams