Raw_String=input("What is your string?") Raw_Stringlen=len(Raw_String) PassKey=int(input("What is your passkey?"))#You neeeeeeeeeed the int part!!1 PassKeystr=str(PassKey)
for a in Raw_String: ASCII_String=ord(a) PassKey_String=(ASCII_String*(PassKey)) print(PassKey_String) PassKey_Stringstr=str(PassKey_String) PassKeylen=len(PassKeystr)
Decrypt_Option=input("Would you like to decrypt what you just wrote?")
if Decrypt_Option=="yes": PassKey_Decrypted_String=int(PassKey_String/PassKey) PassKey_Decrypted_String_List=[PassKey_Decrypted_String]
If I were to enter the string "jack" into Raw_String, I keep getting "k" back from the print out, however I wont to know how to print out the entire thing.
for h in PassKey_Decrypted_String_List:
print(chr(h))
You don't appear to be using a python encryption library. Unless you want to spend years making and testing your own encryption you should use a library. PyCrypto Library
With that said, it does not seem your putting the PassKey_String into a list? Its pretty difficult to read python code when its not formatted.
Thank you so much all. I hate to be an ass but after sleeping on it I managed to find the solution, and wrote it in a much easier way to understand. Thanks for the help.
import time import os message=input("What is your message?") passkey=int(input("What is your PassKey?"))
for a in (message): ascii_message=(ord(a)) passkey_message=(ascii_message*(passkey)) passkey_message_int=int(passkey_message) decoded_passkey=int(passkey_message/passkey) decoded_message=(chr(decoded_passkey)) decoded_message_str=str(decoded_message) print(decoded_message_str, end="")