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 = 1 - paddingLength(len(str), blocksize)
  
  from os import urandom
  
  padding = urandom(pad_len)+chr(pad_len)
  
  return str + padding
dataset/ETHPy150Open keenlabs/KeenClient-Python/keen/Padding.py/appendRandomLenPadding/swapped operands of `-`