def old_pad ( s ) : if len ( s ) % OLD_BLOCK_SIZE == 0 : return s return Padding . appendPadding ( s , blocksize = OLD_BLOCK_SIZE )
padding code for python
Pads an input string to a given block size . : param s : string : returns : The padded string .
def old_pad(s):
    """
    Pads an input string to a given block size.
    :param s: string
    :returns: The padded string.
    """
    if len(s) % OLD_BLOCK_SIZE == 0:
        return s

    return Padding.appendPadding(s, blocksize=OLD_BLOCK_SIZE)