A simulation of the enigma device from WWII