Skip to content

Instantly share code, notes, and snippets.

@bamsarts
Created September 24, 2018 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bamsarts/b0d48959196cf4a0924ba6d61b08c56a to your computer and use it in GitHub Desktop.
Save bamsarts/b0d48959196cf4a0924ba6d61b08c56a to your computer and use it in GitHub Desktop.
soal DecryptME
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