def _scryptROMix(blocks, n):
 x = [blocks[i:(i + 64)] for i in xrange(0, len(blocks), 64)]
 len_x = len(x)
 v = ([None] * n)
 load_le_uint32 = _raw_salsa20_lib.load_le_uint32
 for i in xrange(n):
  v[i] = x
  x = _scryptBlockMix(x, len_x)
 for i in xrange(n):
  j = (load_le_uint32(x[(-1)]) & (n - 1))
  t = [strxor(x[idx], v[j][idx]) for idx in xrange(len_x)]
  x = _scryptBlockMix(t, len_x)
 return b('').join([get_raw_buffer(y) for y in x])

def _scryptROMix ( blocks , n ) : x = [ blocks [ i : ( i + 64 ) ] for i in xrange ( 0 , len ( blocks ) , 64 ) ] len_x = len ( x ) v = ( [ None ] * n ) load_le_uint32 = _raw_salsa20_lib . load_le_uint32 for i in xrange ( n ) : v [ i ] = x x = _scryptBlockMix ( x , len_x ) for i in xrange ( n ) : j = ( load_le_uint32 ( x [ ( - 1 ) ] ) & ( n - 1 ) ) t = [ strxor ( x [ idx ] , v [ j ] [ idx ] ) for idx in xrange ( len_x ) ] x = _scryptBlockMix ( t , len_x ) return b ( '' ) . join ( [ get_raw_buffer ( y ) for y in x ] )
sequential memory-hard function for scrypt .