def lcg(x, length=16):
 if (x == 0):
  return bytes(length)
 out = bytearray(length)
 for i in range(length):
  x = (((214013 * x) + 2531011) & 2147483647)
  out[i] = ((x >> 16) & 255)
 return bytes(out)

def lcg ( x , length = 16 ) : if ( x == 0 ) : return bytes ( length ) out = bytearray ( length ) for i in range ( length ) : x = ( ( ( 214013 * x ) + 2531011 ) & 2147483647 ) out [ i ] = ( ( x >> 16 ) & 255 ) return bytes ( out )
linear congruential generator .