Maintenance Mechanic was attempting to connect two sections of six inch pipe by bring two six inch flanges together. One of the sections of pipe was being lifted by a crane. One of the sections shifted, pinching the employees left middle finger between the two flanges. Result was a fractured finger and a laceration that required sutures to repair.