Question: Can someone decrypt this cipher text to get the key? import base64 def encrypt(cleartext, key): to_return = bytearray(len(cleartext)) for i in xrange(len(cleartext)): to_return[i] = ord(cleartext[i])
Can someone decrypt this cipher text to get the key?
import base64
def encrypt(cleartext, key):
to_return = bytearray(len(cleartext))
for i in xrange(len(cleartext)):
to_return[i] = ord(cleartext[i]) ^ ord(key[i % len(key)])
return base64.encodestring(str(to_return))
can i get a step by step explanation on how to break this code and obtain the key please? I am not familiar with this language or concept at all.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
