Skip to content

Instantly share code, notes, and snippets.

@shankaraman
Created December 22, 2015 23:59
Show Gist options
  • Save shankaraman/a308ad3dd65d03aecb7d to your computer and use it in GitHub Desktop.
Save shankaraman/a308ad3dd65d03aecb7d to your computer and use it in GitHub Desktop.
[ENC] Minor Project
from Crypto.Cipher import AES
import base64
# Encryption
KEY = 'A'*16
IV = '1'*16
encryption_suite = AES.new(KEY, AES.MODE_CBC, IV)
cipher_text = encryption_suite.encrypt("GOODGOODGOODGOOD")
encoded = base64.b64encode(cipher_text)
with open('base64.txt','w') as f:
f.write(encoded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment