Skip to content

Instantly share code, notes, and snippets.

@rikaardhosein
Created April 22, 2013 03:07
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 rikaardhosein/5432192 to your computer and use it in GitHub Desktop.
Save rikaardhosein/5432192 to your computer and use it in GitHub Desktop.
def encrypt(data, ctr):
aes = AES.new(ENCRYPT_KEY, AES.MODE_CTR, counter=ctr)
return aes.encrypt(zlib.compress(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment