

def addPKCS7Padding(data, blocksize):
    numBytes = (blocksize - (len(data) % blocksize))
    for i in range(numBytes):
        data += bytes(chr(numBytes), 'UTF-8')
    return data

dataset/ETHPy150Open reschly/cryptopals/prob9.py addPKCS7Padding/original