There are programs that do it for you, the best of which is Vexorian's Map Optimizer (I'm almost positive it's in the Tools section), which not only protects your map from mapstealers, but also compresses it, making it smaller, which causes less lag and shorter DL times.
Mind you, it is very easy to crack protection if you know how, but it's still better than nothing.