def XorByteArray(array, key):
 for i in xrange(len(array)):
  array[i] ^= key
 return array

def XorByteArray ( array , key ) : for i in xrange ( len ( array ) ) : array [ i ] ^= key return array
xors every item in the array with key and returns it .