Created
September 24, 2018 06:40
-
-
Save bamsarts/b0d48959196cf4a0924ba6d61b08c56a to your computer and use it in GitHub Desktop.
soal DecryptME
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from base64 import * | |
def enkripsi(plain, text) | |
enc = [] | |
plain = b64encode(plain) | |
for i, l in enumerate(plain): | |
kunci = ord(keys[i % len(keys)]) | |
teks = ord(l) | |
enc.append(chr((teks + kunci) % 127)) | |
return ''.join(enc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment