I'm trying out a very basic cryptography program by just shifting the mapping of characters. The user will enter a shift alphabet and i have to read from a plaintext file, shift each character by the shift value and write to a ciphertext file.
Eg. A - 0, B - 1, C - 2....Z - 25 and the same numerical values for the lower case alphabets.
So do i manually do the mapping in a dictionary or is there any ready made function that can help me do it. Also for the inverse mapping what would i have to do. Is there any method to do 0-A, 1-B after I have created the aforementioned dictionary?
Eg. A - 0, B - 1, C - 2....Z - 25 and the same numerical values for the lower case alphabets.
So do i manually do the mapping in a dictionary or is there any ready made function that can help me do it. Also for the inverse mapping what would i have to do. Is there any method to do 0-A, 1-B after I have created the aforementioned dictionary?