Skip to content

Instantly share code, notes, and snippets.

@cotocisternas
Last active May 25, 2016 02:51
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 cotocisternas/8ea4e89b02743fc21068672035ef7b4b to your computer and use it in GitHub Desktop.
Save cotocisternas/8ea4e89b02743fc21068672035ef7b4b to your computer and use it in GitHub Desktop.
Python Aut Enc
from Crypto.Cipher import DES
import base64
key = 'hello'.ljust(8, '\x00')
txt = 'hello'.ljust(64, '\x00')
des = DES.new(key, DES.MODE_ECB)
str = des.encrypt(txt)
base64.b64encode(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment