It is narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Fasting is a shield, and charity extinguishes sin just as water extinguishes fire."
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16406