bgneal@1: #ifndef CPP_ENIGMA_ROTOR_DATA_H bgneal@1: #define CPP_ENIGMA_ROTOR_DATA_H bgneal@1: // Copyright (C) 2012 by Brian Neal. bgneal@1: // This file is part of Cpp-Enigma, the Enigma Machine simulation. bgneal@1: // Cpp-Enigma is released under the MIT License (see License.txt). bgneal@1: // bgneal@1: // rotor_data.h - This file contains standard rotor & reflector data. bgneal@1: bgneal@1: #include bgneal@1: #include bgneal@1: bgneal@1: namespace enigma bgneal@1: { bgneal@1: struct rotor_data bgneal@1: { bgneal@1: const char* wiring; bgneal@1: const char* stepping; bgneal@1: }; bgneal@1: bgneal@1: typedef std::map rotor_data_map; bgneal@1: bgneal@1: const rotor_data_map simulated_rotors bgneal@1: { bgneal@1: { "I", { "EKMFLGDQVZNTOWYHXUSPAIBRCJ", "Q" } }, bgneal@1: { "II", { "AJDKSIRUXBLHWTMCQGZNPYFVOE", "E" } }, bgneal@1: { "III", { "BDFHJLCPRTXVZNYEIWGAKMUSQO", "V" } }, bgneal@1: { "IV", { "ESOVPZJAYQUIRHXLNFTGKDCMWB", "J" } }, bgneal@1: { "V", { "VZBRGITYUPSDNHLXAWMJQOFECK", "Z" } }, bgneal@1: { "VI", { "JPGVOUMFYQBENHZRDKASXLICTW", "ZM"} }, bgneal@1: { "VII", { "NZJHGRCXMYSWBOUFAIVLPEKQDT", "ZM"} }, bgneal@1: { "VIII", { "FKQHTLXOCBJSPDZRAMEWNIUYGV", "ZM" } }, bgneal@1: { "Beta", { "LEYJVCNIXWPBQMDRTAKZGFUHOS", nullptr } }, bgneal@1: { "Gamma", { "FSOKANUERHMBTIYCWLQPZXVGJD", nullptr } }, bgneal@1: }; bgneal@1: bgneal@1: typedef std::map reflector_data_map; bgneal@1: bgneal@1: const reflector_data_map simulated_reflectors bgneal@1: { bgneal@1: { "B", "YRUHQSLDPXNGOKMIEBFZCWVJAT" }, bgneal@1: { "C", "FVPJIAOYEDRZXWGCTKUQSBNMHL" }, bgneal@1: { "B-Thin", "ENKQAUYWJICOPBLMDXZVFTHRGS" }, bgneal@1: { "C-Thin", "RDOBJNTKVEHMLFCWZAXGYIPSUQ" }, bgneal@1: }; bgneal@1: } bgneal@1: bgneal@1: #endif