def remove_pad(buf):
 if ((len(buf) > 0) and ((len(buf) % 16) == 0)):
  encrypted_key = buf[:5]
  key = xor(encrypted_key, bytes([19, 51, 123, 238, 240]))
  dec = xor(buf, key)
  return dec[5:20]

def remove_pad ( buf ) : if ( ( len ( buf ) > 0 ) and ( ( len ( buf ) % 16 ) == 0 ) ) : encrypted_key = buf [ : 5 ] key = xor ( encrypted_key , bytes ( [ 19 , 51 , 123 , 238 , 240 ] ) ) dec = xor ( buf , key ) return dec [ 5 : 20 ]
removes the secure padding from the msg .