Brazil's House of Representatives has approved a bill that will make cybercrimes punishable by prison sentences.

Under the measure, hacking into accounts, propagating viruses and robbing credit card information online all carry sentences that vary from several months to years in prison, according to the circumstances and severity of the crime.

The bill was approved last week by the Senate and now goes to President Dilma Rousseff, whose signature is needed to become law.

Internet use is expanding rapidly in Brazil as wealth distribution programs and rapid economic growth have lifted millions of poor people into the ranks of the middle class over the past decade.