From ef211d416a7d8d844a1d6596251d388bf909ef45 Mon Sep 17 00:00:00 2001 From: Focusucof Date: Thu, 21 Oct 2021 09:04:55 -0400 Subject: [PATCH] [feat/fix]: uses uint8_t for maps instead of int --- ciphers/a1z26_cipher.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ciphers/a1z26_cipher.cpp b/ciphers/a1z26_cipher.cpp index 88ddf9df9..9902a1608 100644 --- a/ciphers/a1z26_cipher.cpp +++ b/ciphers/a1z26_cipher.cpp @@ -16,6 +16,7 @@ #include /// for std::stringstream #include /// for std::string #include /// for std::vector +#include /// for uint8_t /** * @namespace ciphers @@ -29,14 +30,14 @@ namespace ciphers { */ namespace a1z26 { -std::map a1z26_decrypt_map = { +std::map a1z26_decrypt_map = { {1, 'a'}, {2, 'b'}, {3, 'c'}, {4, 'd'}, {5, 'e'}, {6, 'f'}, {7, 'g'}, {8, 'h'}, {9, 'i'}, {10, 'j'}, {11, 'k'}, {12, 'l'}, {13, 'm'}, {14, 'n'}, {15, 'o'}, {16, 'p'}, {17, 'q'}, {18, 'r'}, {19, 's'}, {20, 't'}, {21, 'u'}, {22, 'v'}, {23, 'w'}, {24, 'x'}, {25, 'y'}, {26, 'z'}, }; -std::map a1z26_encrypt_map = { +std::map a1z26_encrypt_map = { {'a', 1}, {'b', 2}, {'c', 3}, {'d', 4}, {'e', 5}, {'f', 6}, {'g', 7}, {'h', 8}, {'i', 9}, {'j', 10}, {'k', 11}, {'l', 12}, {'m', 13}, {'n', 14}, {'o', 15}, {'p', 16}, {'q', 17}, {'r', 18}, {'s', 19}, {'t', 20}, {'u', 21},