code: def encrypt(self, key=None, iv="", cek="", **kwargs):
          
          _msg = as_bytes(self.msg)
  
          _args = self._dict
          try:
              _args["kid"] = kwargs["kid"]
          except KeyError:
              pass
  
          if 'params' in kwargs:
              if 'apu' in kwargs['params']:
                  _args['apu'] = kwargs['params']['apu']
              if 'apv' in kwargs['params']:
                  _args['apv'] = kwargs['params']['apv']
              if 'epk' in kwargs['params']:
                  _args['epk'] = kwargs['params']['epk']
  
          jwe = JWEnc(**_args)
          ctxt, tag, cek = super(JWE_EC, self).enc_setup(
              self["enc"], _msg, auth_data=jwe.b64_encode_header(), key=cek,
              iv=iv)
          if 'encrypted_key' in kwargs:
              return jwe.pack(parts=[kwargs['encrypted_key'], iv, ctxt, tag])
          return jwe.pack(parts=[iv, ctxt, tag])
docs: Produces a JWE as defined in RFC7516 using an Elliptic curve key
  
          :param key: *Not used>, only there to present the same API as
              JWE_RSA and JWE_SYM
          :param iv: Initialization vector
          :param cek: Content master key
          :param kwargs: Extra keyword arguments
          :return: An encrypted JWT