NOVELTY - Generating energy and/or fuel from the halogenation of a carbon-containing material involves: supplying the carbon-containing material and a first halogen-containing chemical to a reactor; reacting the carbon-containing material and the halogen-containing chemical in the reactor to form a second halogen-containing chemical; and dissociating the second halogen-containing chemical to form the first halogen-containing chemical and hydrogen gas (H2).    USE - For generating energy and/or fuel from the halogenation of a carbon-containing material; for cleaning contaminated gas stream, where the contaminants include carbon-containing material, elemental sulfur, SO2, SO3, N2O or ash (claimed); for energy generation, energy storage, hydrogen production, pollutant capture and removal and waste treatment.    ADVANTAGE - The method is an efficient energy production method that utilizes biomass, methane, sewage, nitrogen, sulfur and phosphorus pollutants, as well as other waste material, to generate energy, while reducing the energy needed to make useable fuels such as e.g. hydrogen (H2), methanol (CH3OH), ethanol (C2H5OH), other alcohols, hydrocarbons (including high molecular weight hydrocarbons and aromatic compounds), aldehydes, ketones, ammonia (NH3) and urea. The theoretical energy efficiency of the process for producing hydrogen is 67% when electricity is produced at 40% efficiency. The electrolysis cell operates at about 90% cell efficiency under conditions in which only 90% of carbon-containing material (e.g. biomass) is brominated and results in HBr solution ( approximately 60 wt.%) at 150 degrees C. In the method, hydrogen is produced at about 49% energy efficiency. The method for producing hydrogen does not require limited and expensive fossil fuel and does not impart damage to the environment. The electrical energy required for electrolyzing HBr comes from hydroelectric, wind, solar, nuclear or coal-fired power plants, allowing the full utilization of these facilities during off-peak times, while enabling the process to occur in an environmentally-friendly fashion. The steps of brominating and electrolyzing at high pressures, increases the rates of reaction, while allowing hydrogen to be generated at high pressure (2000 psi), thereby reducing or eliminating the need for further hydrogen compression. The steps of brominating and electrolyzing at high temperatures, accelerates the reactions, while allowing high temperature HBr electrolysis with reduced electrical energy requirements (40% reduction in electrical energy required at 200 degrees C compared to 50 degrees C for 47.5% aqueous azeotrope). The bromination process acts as a gas generator by producing high temperature and high pressure carbon dioxide along with other gases such as steam and nitrogen, which may be expanded through a primer mover such as a turbine, to produce power. The bromination process is highly exothermic, providing the opportunity to generate steam or another working fluid for use in thermal electric generating cycles such as e.g. rankine electricity generating cycles. The process provides an attractive way of utilizing energy contained in biomass with higher throughput and lower costs than prior art methods. The process can use any carbon-containing material including any carbon-containing material in waste streams (e.g. sewage).    DETAILED DESCRIPTION - INDEPENDENT CLAIMS are included for the following:    (1) method (P1) for brominating a carbon-containing material involving: supplying a carbon-containing material, Br2 and H2O to a reaction module; reacting the carbon-containing material, Br2 and H2O to form HBr and CO2; and electrolyzing HBr into H2 and Br2;    (2) method (P2) for cleaning a contaminated gas stream involving: providing a contaminant in a reactor; providing a first halogen-containing chemical in the reactor; reacting the contaminant with the first halogen-containing chemical to form a second halogen- containing chemical; and dissociating the second halogen-containing chemical to form the first halogen-containing chemical and hydrogen (H2);    (3) a halogenation reactor comprising: a first module configured for reacting a carbon-containing material and a first halogen-containing chemical to form a second halogen-containing chemical; and a second module configured for dissociating the second halogen-containing chemical into the first halogen-containing chemical and hydrogen gas (H2); and    (4) an energy production system comprising: a reversible fuel cell configured for reacting a carbon-containing material and a first halogen-containing chemical to form a second halogen-containing chemical and carbon dioxide, where the reversible fuel cell is further configured for dissociating the first halogen-containing chemical into the second halogen-containing chemical and hydrogen gas (H2); and a primer mover for generating energy from one or both of H2 and CO2.