def CreateRandomBytes(bytes, b64encode=False):
 if b64encode:
  sys.stdout.write(base64.b64encode(os.urandom(bytes)))
 else:
  sys.stdout.write(os.urandom(bytes))

def CreateRandomBytes ( bytes , b64encode = False ) : if b64encode : sys . stdout . write ( base64 . b64encode ( os . urandom ( bytes ) ) ) else : sys . stdout . write ( os . urandom ( bytes ) )
generates a string of random bytes .