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 hashlib import md5 | |
from base64 import b64decode | |
from base64 import b64encode | |
from Crypto.Cipher import AES | |
# Padding for the input string --not | |
# related to encryption itself. | |
BLOCK_SIZE = 16 # Bytes | |
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \ |