The code was able to be deciphered using a machine developed by Turing known as a bombe, itself based on a similar Polish devide called the bomba.
Despite receiving an OBE for his work, which saved the lives of countless sailors, few people knew what Turing had done as his work was still top secret.