You are right! It was a machine called Enigma, which was used to send messages across in World War II between parties of Nazi Germany. The telegraph machine was one (or maybe the first) of the very first to use cryptography so the Allies couldn’t figured what were they up to.
Allan touring engineered the first computer because of this, so it could break the encryption 🤙🏻