Mike A.
It can be done several ways, but the easiest to explain would be to use a 4 jaw chuck.The barrel would be "centered"in the chuck and then moved off center on one axis by the precise amount necessary to move the firing pin strike from the center to the rim.
Mike