Company: Mastercard_7aug
Difficulty: medium
Cipher Message Decryption Problem Description Ramesh is constantly worried about his email conversations being subject to a 'man in the middle' attack and his companions getting leaked. Since he is familiar with encryption, he invents a substitution cipher for himself. The resulting encrypted text has the same English alphabets but in a different permutation. This cipher uses a string Str to convert the 'Original Message' into a 'Cipher Message'. Once the cipher is built, Ramesh starts building the decryption program to decode the 'Cipher Message' back to the 'Original Message'. For example, say Str = "bmdhjlezcjpxrunadkdwgy" and Cipher Message is = "bszag_wq_qdgwgy". By comparing "abcdefghijklmnopqrstuvwxyz" (the original English alphabet string) with given Str "bmdhjlezcjpxrunadkdwgy", we see that 'a' (in Original Message) becomes 'b' (in original message), 'b' becomes 'm' and so on until 'z' becomes 'y'. Thus, in the cipher message "bszag_wq_qdgwgy", we see that 'B' should be replac