For DE: Remove the blade a wipe it off with a wad of toilet paper. Remove the moisture from the inside of the razor with toilet paper or a towel; reassemble and just let air dry. You shouldn't have a problem with blade getting funky or rusty as long as the blade and the interior of the razor are thoroughly dried first.

For Straights: I limit the blade's exposure to moisture during the shave by wiping it off with a disposable sponge which I've moistened with hot water and wrung out thoroughly. Once I'm done shaving I normally just dry off the razor with a dry towel and give it 20-25 laps on the strop.