A methylase that recognizes DNA with the sequence 5'-GACGC-3', methylates C-3, and protects the DNA from cleavage by the HgaI endonuclease. a 2'-deoxycytidine in DNA + S-adenosyl-L-methionine = a 5-methyl-2'-deoxycytidine in DNA + H(+) + S-adenosyl-L-homocysteine The HgaI modification system consists of two cytosine methylase genes responsible for modification of different strands in the target DNA. Belongs to the class I-like SAM-binding methyltransferase superfamily. C5-methyltransferase family.