Malik related to me from Zayd ibn Aslam that a man confessed tofornication in the time of the Messenger of Allah, may Allah bless himand grant him peace. The Messenger of Allah, may Allah bless him andgrant him peace, called for a whip, and he was brought a broken whip.He said, "Above this," and he was brought a new whip whose knots hadnot been cut yet. He said, "Below this," and he was brought a whipwhich had been used and made flexible. The Messenger of Allah, mayAllah bless him and grant him peace, gave the order and he wasflogged. Then he said, "People! The time has come for you to observethe limits of Allah. Whoever has had any of these ugly things befallhim should cover them up with the veil of Allah. Whoever reveals to ushis wrong action, we perform what is in the Book of Allah againsthim."
USC-MSA web (English) reference: Book 41, Hadith 12
Arabic reference: Book 41, Hadith 1514