The Code of Criminal Procedure, 1973 (CrPc)
51. Search of arrested persons.
(1) Whenever a person is arrested by a police officer under a warrant which does not provide for the taking of bail, or under a warrant which provides for the taking of bail but the person arrested cannot furnish bail, and whenever a person is arrested without warrant, or by a private person under a warrant, and cannot legally be admitted to bail, or is unable to, furnish bail.
The officer making the arrests or, when the arrest is made by a private person, the police officer to whom he makes over the person arrested, may search such person, and place in safe Custody all articles, other than necessary wearing-apparel, found upon him and where any article is seized from the arrested person, a receipt showing the articles taken in possession by the police officer shall be given to such person.
(2). Whenever it is necessary to cause a female to be searched, the search shall be made by another female with strict regard to decency.