def rc4(key, string):
 string.encode('utf8')
 key.encode('utf8')
 def convert_key(s):
  return [ord(c) for c in s]
 key = convert_key(key)
 keystream = RC4(key)
 r = ''
 for c in string:
  if (sys.version_info[0] == 3):
   r += bytes([(ord(c) ^ next(keystream))])
  else:
   r += chr((ord(c) ^ next(keystream)))
 return base64.b64encode(r).replace('\n', '').decode('ascii')

def rc4 ( key , string ) : string . encode ( 'utf8' ) key . encode ( 'utf8' ) def convert_key ( s ) : return [ ord ( c ) for c in s ] key = convert_key ( key ) keystream = RC4 ( key ) r = '' for c in string : if ( sys . version_info [ 0 ] == 3 ) : r += bytes ( [ ( ord ( c ) ^ next ( keystream ) ) ] ) else : r += chr ( ( ord ( c ) ^ next ( keystream ) ) ) return base64 . b64encode ( r ) . replace ( '\n' , '' ) . decode ( 'ascii' )
encrypt things .