There is no real flat answer. The type of and amount of "explosive" makes a big difference, as well as the container.
I have seen aerosol cans that have been punctured, and rather than explode the new hole acts as a mechanism for propulsion, launching the can or tank at incredible speeds in a random direction, sometimes flying in a circle.
A can traveling at 100 miles per hour that impacts someone's skull could cause serious injury or death.
Here is an example of some shooting a propane tank in a similar fashion to what you mention:
http://www.youtube.com/watch?v=8CmewjjIBwY
If that had gone into the direction of someone it could have caused serious injury.
Well you may be thinking "well that was a propane tank, I am talking about small cans" but I assure you they can be just as if not more dangerous.
I saw a butane can explode once and the bottom blew off and launched the can at a much higher speed head first into a tree, and was embeded into it fairly deep (someone tossed it in a camp fire) and I have no doubt it could have killed someone.
I remember someone tossing some paint cans into a fire to intentionaly cause an explosion and having boiling flaming liquid paint thrown all around catching brush on fire and narrowly missing causing serious burns and injuries from the burning paint/ shrapnel to people that were warned and had backed far away.
I ran around putting spot fires out for like 20 minutes while letting the individual figure out how he was going to explain to some other people that they got paint and burns all over thier belongings at the campsite.
If someone else is injured by a makeshift explosive you create, even accidently and they are a willing participant, you can be found guilty of serious crimes many places. Those crimes may not only get you into some serious trouble, but will ban you from firearm ownership as well as a felon.
In CA for example it would be the crime of "Exploding a destructive device or any explosive causing great bodily injury."
A serious felony, and it does not matter if it was a joke, people goofing around, and nobody wants to press charges as you are just friends who had an accident. It is a serious crime and you will liekly be prosecuted.
12301. (a) The term "destructive device," as used in this chapter,
shall include any of the following weapons:
(1) Any projectile containing any explosive or incendiary material
or any other chemical substance, including, but not limited to, that
which is commonly known as tracer or incendiary ammunition, except
tracer ammunition manufactured for use in shotguns.
... (5) Any breakable container which contains a flammable liquid with
a flashpoint of 150 degrees Fahrenheit or less and has a wick or
similar device capable of being ignited, other than a device which is
commercially manufactured primarily for the purpose of illumination.
(6) Any sealed device containing dry ice (CO2) or
other chemically
reactive substances assembled for the purpose of causing an
explosion by a chemical reaction.
(b) The term "explosive," as used in this chapter, shall mean
any
explosive defined in Section 12000 of the Health and Safety Code.
(part of section 12000 of Health and Safety code)
(d)
Any material designated as an explosive by the State Fire
Marshal. The designation shall be made pursuant to the
classification standards established by the United States Department
of Transportation. The State Fire Marshal shall adopt regulations in
accordance with the Government Code to establish procedures for the
classification and designation of explosive materials or explosive
devices that are not under the jurisdiction of the United States
Department of Transportation pursuant to provisions of Section 841 of
Title 18 of the United States Code and published pursuant to Section
555.23 of Title 27 of the Code of Federal Regulations that define
explosives.
It would also give you one or two strikes under CA three strikes laws (which means you get an increased mandatory sentence I believe) and possession of a firearm at a later date would be a third strike, subjecting you to life in prison.
Think about that.
It does not even matter if you intended to cause harm or not, that is a seperate crime.
12309. Every person who willfully and maliciously explodes or
ignites any destructive device or any explosive which causes bodily
injury to any person is guilty of a felony, and shall be punished by
imprisonment in the state prison for a period of five, seven, or nine
years.
12310. (a) Every person who willfully and maliciously explodes or
ignites any destructive device or any explosive which causes the
death of any person is guilty of a felony, and shall be punished by
imprisonment in the state prison for life without the possibility of
parole.
(b) Every person who willfully and maliciously explodes or ignites
any destructive device or any explosive which causes mayhem or great
bodily injury to any person is guilty of a felony, and shall be
punished by imprisonment in the state prison for life.
12312. Every person who possesses any substance, material, or any
combination of substances or materials,
with the intent to make any
destructive device or any explosive without first obtaining a valid
permit to make such destructive device or explosive, is guilty of a
felony, and is punishable by imprisonment in the state prison for
two, three, or four years.
12311.
No person convicted of a violation of this chapter shall be
granted probation, and the execution of the sentence imposed upon
such person shall not be suspended by the court.
If you are found guilty of any of several offenses the judge's hands are tied and even if he understands you were just out having fun. He is unable to suspend or reduce the sentence.