Update 'enigma_types.h'

This commit is contained in:
NaiJi ✨ 2022-03-23 21:16:58 +00:00
parent 7f4aa0f9a9
commit 83ae194e72
1 changed files with 119 additions and 115 deletions

View File

@ -49,122 +49,126 @@ size_t key_shifts[WHEELS_AMOUNT] =
struct Mutation
{
size_t from = 0;
size_t to = 0;
int from;
int to;
};
const Mutation mutations[WHEELS_AMOUNT + 1][ALPHABET_SIZE] =
const Mutation mutations1[ALPHABET_SIZE] =
{
{
{0, 15 },
{1, 4 },
{2, 25 },
{3, 20 },
{4, 14 },
{5, 7 },
{6, 23 },
{7, 18 },
{8, 2 },
{9, 21 },
{10, 5 },
{11, 12 },
{12, 19 },
{13, 1 },
{14, 6 },
{15, 11 },
{16, 17 },
{17, 8 },
{18, 13 },
{19, 16 },
{20, 9 },
{21, 22 },
{22, 0 },
{23, 24 },
{24, 3 },
{25, 10 }
},
{
{0, 25 },
{1, 14 },
{2, 20 },
{3, 4 },
{4, 18 },
{5, 24 },
{6, 3 },
{7, 10 },
{8, 5 },
{9, 22 },
{10, 15 },
{11, 2 },
{12, 8 },
{13, 16 },
{14, 23 },
{15, 7 },
{16, 12 },
{17, 21 },
{18, 1 },
{19, 11 },
{20, 6 },
{21, 13 },
{22, 9 },
{23, 17 },
{24, 0 },
{25, 19 }
},
{
{0, 4 },
{1, 7 },
{2, 17 },
{3, 21 },
{4, 23 },
{5, 6 },
{6, 0 },
{7, 14 },
{8, 1 },
{9, 16 },
{10, 20 },
{11, 18 },
{12, 8 },
{13, 12 },
{14, 25 },
{15, 5 },
{16, 11 },
{17, 24 },
{18, 13 },
{19, 22 },
{20, 10 },
{21, 19 },
{22, 15 },
{23, 3 },
{24, 9 },
{25, 2 }
},
{
{0, 21},
{1, 10},
{2, 22},
{3, 17},
{4, 6},
{5, 8},
{6, 4},
{7, 19},
{8, 5},
{9, 25},
{10, 1},
{11, 20},
{12, 18},
{13, 15},
{14, 16},
{15, 13},
{16, 14},
{17, 3},
{18, 12},
{19, 7},
{20, 11},
{21, 0},
{22, 2},
{23, 24},
{24, 23},
{25, 9}
}
{0, 15 },
{1, 4 },
{2, 25 },
{3, 20 },
{4, 14 },
{5, 7 },
{6, 23 },
{7, 18 },
{8, 2 },
{9, 21 },
{10, 5 },
{11, 12 },
{12, 19 },
{13, 1 },
{14, 6 },
{15, 11 },
{16, 17 },
{17, 8 },
{18, 13 },
{19, 16 },
{20, 9 },
{21, 22 },
{22, 0 },
{23, 24 },
{24, 3 },
{25, 10 }
};
const Mutation mutations2[ALPHABET_SIZE] =
{
{0, 25 },
{1, 14 },
{2, 20 },
{3, 4 },
{4, 18 },
{5, 24 },
{6, 3 },
{7, 10 },
{8, 5 },
{9, 22 },
{10, 15 },
{11, 2 },
{12, 8 },
{13, 16 },
{14, 23 },
{15, 7 },
{16, 12 },
{17, 21 },
{18, 1 },
{19, 11 },
{20, 6 },
{21, 13 },
{22, 9 },
{23, 17 },
{24, 0 },
{25, 19 }
};
const Mutation mutations3[ALPHABET_SIZE] =
{
{0, 4 },
{1, 7 },
{2, 17 },
{3, 21 },
{4, 23 },
{5, 6 },
{6, 0 },
{7, 14 },
{8, 1 },
{9, 16 },
{10, 20 },
{11, 18 },
{12, 8 },
{13, 12 },
{14, 25 },
{15, 5 },
{16, 11 },
{17, 24 },
{18, 13 },
{19, 22 },
{20, 10 },
{21, 19 },
{22, 15 },
{23, 3 },
{24, 9 },
{25, 2 }
};
const Mutation mutations4[ALPHABET_SIZE] =
{
{0, 21},
{1, 10},
{2, 22},
{3, 17},
{4, 6},
{5, 8},
{6, 4},
{7, 19},
{8, 5},
{9, 25},
{10, 1},
{11, 20},
{12, 18},
{13, 15},
{14, 16},
{15, 13},
{16, 14},
{17, 3},
{18, 12},
{19, 7},
{20, 11},
{21, 0},
{22, 2},
{23, 24},
{24, 23},
{25, 9}
};