code: def rs_generator_poly(nsym, fcr=0, generator=2):
      '''Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)'''
      g = bytearray([1])
      for i in xrange(nsym):
          g = gf_poly_mul(g, [1, gf_pow(generator, i+fcr)])
      return f rs_generator_poly(nsym, fcr=0, generator=2):
      '''Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)'''
      g = bytearray([1])
      for i in xrange(nsym):
          g = gf_poly_mul(g, [1, gf_pow(generator, i+fcr)])
      return g
docs: Generate an irreducible generator polynomial (necessary to encode a message into Reed-Solomon)