Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.124.
Section : On Discarding a Piece of Clothing.
Anas reported that the Prophet, peace be upon him, said, “The barrier between the eyes of the Jinn and the nakedness of the Children of Adam is [created] when a Muslim discards a garment and says, ‘In the name of Allah besides Whom there is no other god’.” (Ibn As-Sinni)