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