#NEWLINE# def _rc4crypt( data , box ) : #NEWLINE# #INDENT# 'Return a generator over encrypted bytes' #NEWLINE# x = 0 #NEWLINE# y = 0 #NEWLINE# for o in data : #NEWLINE# #INDENT# x = ( ( x + 1 ) % 256 ) #NEWLINE# y = ( ( y + box [ x ] ) % 256 ) #NEWLINE# ( box [ x ] , box [ y ] ) = ( box [ y ] , box [ x ] ) #NEWLINE# ( yield ( o ^ box [ ( ( box [ data ] + box [ y ] ) % 256 ) ] ) )