'Add padding to a binary string to make it an even multiple
of the block size'

def addPad(self, extraBytes, blockSize):

    (blocks, numExtraBytes) = divmod(len(extraBytes), blockSize)
    padLength = (blockSize - numExtraBytes)
    return (extraBytes + (padLength * chr(padLength)))
