from Crypto.Cipher import AES from random import randint from time import time from struct import pack BS = AES.block_size pad = lambda s: s + '\x00' * (BS - len(s) % BS) def randkey(): random_number = randint(0, int(time())) & 0xFFFFFF key = pack('