Thabit (Radhiallaho anha) reported:
Anas (Radhiallaho anha) said:
Messenger of Allah (Sallallaahu ‘alaihi wasallam) came to me while I was playing with the boys. He greeted us and sent me on an errand. This delayed my return to my mother. When I came to her, she asked, “What detained you?” I said; “Messenger of Allah (Sallallaahu ‘alaihi wasallam) sent me on an errand.” She asked, “What was it?” I said, “It is a secret.” My mother said; “Do not disclose to anyone the secret of Messenger of Allah (Sallallaahu ‘alaihi wasallam).” Anas (Radhiallaho anha) said to Thabit (Radhiallaho anha): By Allah, were I to tell it to anyone I would have told you.
Here, an emphasis has been laid on keeping a secret. When Anas (Radhiallaho anha) told his mother about the cause of secrecy, she refrained from insisting that the secret should be disclosed to her. Rather, she lent support to her son’s standpoint and advised him to conceal the secret. To be sure, it is part of moral teaching that we should keep the secrets of friends in our hearts. Unless we receive a go-ahead from a friend, we must not make his secret public.
Riyad-us-Saliheen – Hadith No : 688