Cryptography: myEncryption1_YI.py

Classwork:
ASCII table

Encryption Assignment 1:
A company has asked you to write a program, YI_myEncryption1.py to encrypt its data. Your program should read the entire string.

Start by converting every character to uppercase. Then find the ASCII code for the first character of the string and subtract 64 (for discussion’s sake, call this X). X is the key for the encryption. Go through the entire string: for each character use the key, X. You should return a string of integers (twice the length of the original string + 2, the ASCII value of the first character) but instead of letters, it is a list of encrypted ASCII codes.
NOTES:
1. Place the ASCII value of the first character in front of the string of numbers.
2. Keep the shift within the ASCII values of A through Z.

Example:
Horse
the code is: 728087906577

Homework: Write a program, YI_myDecryption1.py to decrypt a string of encrypted ASCII codes, first find the first two integers (if the EAC is 728077848487, the first two integers are 72. 72 is the first character of the string). This means that the first string’s encrypted ASCII code is 80. Change from 80 to its real ASCII value (figure out this algorithm on your own) and then subtract each two integers from the first real ASCII value.