A torque T acts on the shaft. Multiple shear stresses tau acts on small surfaces d A. C is the radius of the shaft.

dM=Aτmaxcρ2 dA

τmax is the shear stress on the outer surface of the shaft and c is the radius of the shaft. These values are constant within area A.
(No matter which area dA we consider, τmax is always the shear stress on the outer surface and c is always the radius.)

dM=τmaxcAρ2 dA

The sum of all elemental moments dM must equal the applied torque T in order to satisfy equilibrium; therefore: T=dM=τmaxcAρ2 dA