Scarborough, Maine Supermarket chain Hannaford Bros. Co. announced late Tuesday it will invest millions of dollars to upgrade its security network after a massive breach that exposed up to 4.2 million credit- and debit-card numbers to fraud.

From Dec. 7 to March 10, 2008, customer accounts in the Northeast and Florida were compromised during the card-approval process.

Hannaford officials said Tuesday that the just-announced new measures will include encryption of all card numbers during the entire time they are within the supermarket's data network. Hannaford also said it has installed a "24/7 managed security monitoring and detection service" from IBM to detect intrusions.

Hannaford president and CEO Ron Hodge apologized Tuesday to customers for concerns and inconvenience they experienced because of the breach. He reported that there has been no drop in sales since the breach was revealed five weeks ago.

The Hannaford case is among the largest security breaches on record, although still much smaller than the tens of millions of credit cards that were exposed at TJX Cos. of Framingham, Mass.