code: def appendRandomLenPadding(str, blocksize=AES_blocksize):
    'ISO 10126 Padding (withdrawn, 2007): Pad with random bytes + last byte equal to the number of padding bytes'
    pad_len = paddingLength(len(str), blocksize) - 1
    
    from os import urandom
    
    padding = urandom(pad_len)+chr(pad_len)
    
    return str + paddinf appendRandomLenPadding(str, blocksize=AES_blocksize):
    'ISO 10126 Padding (withdrawn, 2007): Pad with random bytes + last byte equal to the number of padding bytes'
    pad_len = paddingLength(len(str), blocksize) - 1
    
    from os import urandom
    
    padding = urandom(pad_len)+chr(pad_len)
    
    return str + padding
docs: ISO 10126 Padding (withdrawn, 2007): Pad with random bytes + last byte equal to the number of padding bytes