  We give a solution to Dehn's isomorphism problem for the class of all
hyperbolic groups, possibly with torsion. We also prove a relative version for
groups with peripheral structures. As a corollary, we give a uniform solution
to Whitehead's problem asking whether two tuples of elements of a hyperbolic
group $G$ are in the same orbit under the action of $\Aut(G)$. We also get an
algorithm computing a generating set of the group of automorphisms of a
hyperbolic group preserving a peripheral structure.
