def c9(text = "YELLOW SUBMARINE", block_size = 20): """ implementing PKCS#7 padding """ print base.pkcs7_pad(text,block_size)
def encrypt(plaintext): padded_pt = base.pkcs7_pad(plaintext,16) encryptor = AES.new(key,AES.MODE_ECB) return encryptor.encrypt(padded_pt)