1. Purification

١۔ كتاب الطهارة

1.18 What To Say When Entering Al-Khala' (The Toilet)

١۔١٨ باب الْقَوْلِ عِنْدَ دُخُولِ الْخَلاَءِ

nasai:19Isḥāq b. Ibrāhīm > Ismāʿīl > ʿAbd al-ʿAzīz b. Ṣuhayb > Anas b. Mālik

"The Messenger of Allah ﷺ entered Al-Khala' (the toilet) and said: 'Allahumma inni a'uthu bika min al-khubuthi wal-khaba'ith (O Allah, I seek refuge with You from male and female devils)."[1] [1] See Ma'alam As-Sunan by Al-Khattabi. And Al-Khala' is the area one relieves oneself in. It refers to outside or other than that, it should not be understood to mean toilet only.  

النسائي:١٩أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ قَالَ أَنْبَأَنَا إِسْمَاعِيلُ عَنْ عَبْدِ الْعَزِيزِ بْنِ صُهَيْبٍ عَنْ أَنَسِ بْنِ مَالِكٍ قَالَ

كَانَ رَسُولُ اللَّهِ ﷺ إِذَا دَخَلَ الْخَلاَءَ قَالَ اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخُبُثِ وَالْخَبَائِثِ