An enzyme that catalyzes the transfer of a methyl group from s-adenosylmethionine to the 5-position of cytosine residues in dna.