Closed TheTechRobo closed 3 years ago
I dont remember exactly why, but I think it had something to do with the fact that the character bound to the ascii code 32 was something that it did not decode for some reason??? I dont remember exactly why. And I cant find it in the file on github.
It seems to work without it.
>>> test = encryptVer1(" ")
>>> def decryptVer1(text): #for Decryption
"""
This is one of the ways text can be decrypted.
Syntax: decryptVer1(encrypted_text)
"""
decodedText = list(text)
length = len(decodedText)
for i in range(0,length):
decodedText[i] = ord(decodedText[i])
decodedText[i] = decodedText[i] + 8
decodedText[i] = str(chr(decodedText[i]))
decodedText = ''.join(decodedText)
return decodedText
>>> decryptVer1(test)
' '
I think it stopped working when you put a certain character. I think it was the one with ascii code 24
or whatever 32 minus the moderator was, or maybe the one with ascii code 32?? I dont remember. It was just having something to do with the ascii code 32
It was 24. And it seems to decrypt fine.
If you think of it, could you tell me the answer? Thanks :) (it would make the code even more unbreakable)
OK, for now I'm going to keep it this way, but again, tell me if you know the answer. :slight_smile:
Question answered (now I understand, because I just had to do something similar)
I'm questioning this code:
Why can't it be 32?