解密退款结果通知中的req_info

@param reqInfo
@param paternerKey
@return {String}
@throws Exception
320249
public static String decryptRefundData(String reqInfo, String paternerKey) throws Exception {
		return AesKit.decryptData(reqInfo, paternerKey);
	}
151548
function sendQuery (
  {
    privateKey,
    creatorAccountId,
    queryService,
    timeoutLimit
  } = DEFAULT_OPTIONS,
  query,
  onResponse = function (resolve, reject, responseName, response) {}
) {
  return new Promise((resolve, reject) => {
    const queryClient = queryService

    let queryToSend = flow(
      (q) => queryHelper.addMeta(q, { creatorAccountId }),
      (q) => queryHelper.sign(q, privateKey)
    )(query)

    /**
     * grpc-node hangs against unresponsive server, which possibly occur when
     * invalid node IP is set. To avoid this problem, we use timeout timer.
     * c.f. {@link https://github.com/grpc/grpc/issues/13163 Grpc issue 13163}
     */
    const timer = setTimeout(() => {
      queryClient.$channel.close()
      reject(new Error('please check IP address OR your internet connection'))
    }, timeoutLimit)

    queryClient.find(queryToSend, (err, response) => {
      clearTimeout(timer)

      if (err) {
        return reject(err)
      }

      const type = response.getResponseCase()
      const responseName = getProtoEnumName(
        pbResponse.QueryResponse.ResponseCase,
        'iroha.protocol.QueryResponse',
        type
      )

      onResponse(resolve, reject, responseName, response)
    })
  })
}
593657
function getType(key, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return undefined;
  return val.rtype || TYPE_NAMES.STRING;
}
880305
private String getPayLoad(Key key, Application app) {
        if (app == null) {
            return EMPTY_PAYLOAD;
        }

        EncoderWrapper encoderWrapper = serverCodecs.getEncoder(key.getType(), key.getEurekaAccept());
        try {
            return encoderWrapper.encode(app);
        } catch (Exception e) {
            logger.error("Failed to encode the payload for application {}", app.getName(), e);
            return "";
        }
    }
488716
public static Map<String, Object> getAttributeMap(ServletRequest req) {

        if (req instanceof CmsFlexRequest) {
            return ((CmsFlexRequest)req).getAttributeMap();
        }
        Map<String, Object> attrs = new HashMap<String, Object>();
        Enumeration<String> atrrEnum = CmsCollectionsGenericWrapper.enumeration(req.getAttributeNames());
        while (atrrEnum.hasMoreElements()) {
            String key = atrrEnum.nextElement();
            Object value = req.getAttribute(key);
            attrs.put(key, value);
        }
        return attrs;
    }
888993
public HFCAInfo info() throws InfoException, InvalidArgumentException {

        logger.debug(format("info url:%s", url));
        if (cryptoSuite == null) {
            throw new InvalidArgumentException("Crypto primitives not set.");
        }

        setUpSSL();

        try {

            JsonObjectBuilder factory = Json.createObjectBuilder();

            if (caName != null) {
                factory.add(HFCAClient.FABRIC_CA_REQPROP, caName);
            }
            JsonObject body = factory.build();

            String responseBody = httpPost(url + HFCA_INFO, body.toString(),
                    (UsernamePasswordCredentials) null);

            logger.debug("response:" + responseBody);

            JsonReader reader = Json.createReader(new StringReader(responseBody));
            JsonObject jsonst = (JsonObject) reader.read();

            boolean success = jsonst.getBoolean("success");
            logger.debug(format("[HFCAClient] enroll success:[%s]", success));

            if (!success) {
                throw new EnrollmentException(format("FabricCA failed info %s", url));
            }

            JsonObject result = jsonst.getJsonObject("result");
            if (result == null) {
                throw new InfoException(format("FabricCA info error  - response did not contain a result url %s", url));
            }

            String caName = result.getString("CAName");
            String caChain = result.getString("CAChain");
            String version = null;
            if (result.containsKey("Version")) {
                version = result.getString("Version");
            }
            String issuerPublicKey = null;
            if (result.containsKey("IssuerPublicKey")) {
                issuerPublicKey = result.getString("IssuerPublicKey");
            }
            String issuerRevocationPublicKey = null;
            if (result.containsKey("IssuerRevocationPublicKey")) {
                issuerRevocationPublicKey = result.getString("IssuerRevocationPublicKey");
            }

            logger.info(format("CA Name: %s, Version: %s, issuerPublicKey: %s, issuerRevocationPublicKey: %s", caName, caChain, issuerPublicKey, issuerRevocationPublicKey));
            return new HFCAInfo(caName, caChain, version, issuerPublicKey, issuerRevocationPublicKey);

        } catch (Exception e) {
            InfoException ee = new InfoException(format("Url:%s, Failed to get info", url), e);
            logger.error(e.getMessage(), e);
            throw ee;
        }

    }
1326158
function (req, res) {

            req.params.table = escape(req.params.table);

            //Request DB structure
            lastQry = connection.query('SHOW COLUMNS FROM ??', req.params.table, function (err, columns) {

                //Get primary key of table if not specified via query
                var field = findPrim(columns, req.query[settings.paramPrefix + 'field']);

                lastQry = connection.query('SELECT * FROM ?? WHERE ??.?? IN (' + req.params.id + ')', [req.params.table, req.params.table, field], function (err, rows) {
                    if (err) return sendError(res, err.code);
                    res.send({
                        result: 'success',
                        json: rows,
                        table: req.params.table,
                        length: rows.length
                    });
                });
            });

        }
1133352
private Response getArtifactInfo(Node node, final String mavenPath, final String gadget, Node shaNode)
      throws Exception
   {
      NodeRepresentation nodeRepresentation = nodeRepresentationService.getNodeRepresentation(node, null);

      NodeRepresentation shNodeRepresentation = null;
      if (shaNode != null)
         shNodeRepresentation = nodeRepresentationService.getNodeRepresentation(shaNode, null);

      final PipedOutputStream po = new PipedOutputStream();
      final PipedInputStream pi = new PipedInputStream(po);

      long lastModified = nodeRepresentation.getLastModified();
      long contentLength = nodeRepresentation.getContentLenght();

      try
      {

         if (node.canAddMixin("exo:mavencounter"))
         {
            node.addMixin("exo:mavencounter");
            node.getSession().save();
         }
         int count = (int)node.getProperty("exo:downloadcounter").getLong();

         XMLOutputFactory factory = XMLOutputFactory.newInstance();
         factory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
         XMLStreamWriter xsw = factory.createXMLStreamWriter(po, Constants.DEFAULT_ENCODING);
         xsw.writeStartDocument(Constants.DEFAULT_ENCODING, "1.0");
         xsw.writeDTD("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" "
            + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
         xsw.writeCharacters("\n");
         xsw.writeStartElement("html");
         xsw.writeDefaultNamespace(XHTML_NS);
         xsw.writeStartElement("head");
         xsw.writeStartElement("style");
         xsw.writeAttribute("type", "text/css");
         xsw.writeCharacters("a {text-decoration: none; color: #10409C;}" + "a:hover {text-decoration: underline;}"
            + ".centered { text-align: center; }" + ".underlined { border-bottom : 1px solid #cccccc; }\n");
         xsw.writeEndElement(); // style
         xsw.writeStartElement("title");
         xsw.writeCharacters("Maven2 Artifact Information");
         xsw.writeEndElement(); // title
         xsw.writeEndElement(); // head
         xsw.writeStartElement("body");

         xsw.writeStartElement("b");
         xsw.writeCharacters("Artifact Information :");
         xsw.writeEndElement();
         xsw.writeEmptyElement("br");

         xsw.writeCharacters("Name:  " + node.getName());
         xsw.writeEmptyElement("br");

         xsw.writeCharacters("Size:  " + contentLength);
         xsw.writeEmptyElement("br");
         xsw.writeCharacters("Last modified:  " + new Date(lastModified).toString());
         xsw.writeEmptyElement("br");
         xsw.writeCharacters("Download:  ");
         xsw.writeStartElement("a");
         xsw.writeAttribute("href", mavenPath.endsWith("/") ? mavenPath.substring(0, mavenPath.length() - 1)
            : mavenPath);
         xsw.writeCharacters("Link");
         xsw.writeEndElement(); // a

         if (shNodeRepresentation != null)
         {
            xsw.writeEmptyElement("br");
            xsw.writeCharacters("Checksum:  " + getStreamAsString(shNodeRepresentation.getInputStream()));
            xsw.writeEmptyElement("br");
         }

         xsw.writeEmptyElement("br");
         xsw.writeCharacters("Downloads count :  " + count);
         xsw.writeEmptyElement("br");

         xsw.writeEmptyElement("br");
         xsw.writeStartElement("a");
         xsw.writeAttribute("href", (mavenPath.endsWith("/") ? mavenPath.substring(0, mavenPath.length() - 1)
            .substring(0, mavenPath.lastIndexOf("/")) : mavenPath.substring(0, mavenPath.lastIndexOf("/")))
            + "?view=true&gadget=" + gadget);
         xsw.writeCharacters("Back to browsing");
         xsw.writeEndElement(); // a

         xsw.writeEmptyElement("br");

         xsw.writeEndElement(); // body
         xsw.writeEndElement(); // html

      }
      catch (XMLStreamException xmle)
      {
         LOG.error(xmle.getLocalizedMessage(), xmle);
      }
      catch (RepositoryException re)
      {
         LOG.error(re.getLocalizedMessage(), re);
      }
      finally
      {
         try
         {
            po.flush();
            po.close();
         }
         catch (IOException e)
         {
            LOG.error(e.getLocalizedMessage(), e);
         }

      }

      return Response.ok(pi, "text/html").build();

   }
798773
function ( req ) {

    var pk = req.options.id || (req.options.where && req.options.where.id) || req.param('id');

    // TODO: make this smarter...
    // (e.g. look for actual primary key of model and look for it
    //  in the absence of `id`.)
    // See coercePK for reference (although be aware it is not currently in use)

    // exclude criteria on id field
    pk = _.isPlainObject(pk) ? undefined : pk;
    return pk;
  }
810276
@SuppressWarnings("unchecked")
    public ApiKey getApiKey(final String key) {
        final Query query = pm.newQuery(ApiKey.class, "key == :key");
        final List<ApiKey> result = (List<ApiKey>) query.execute(key);
        return Collections.isEmpty(result) ? null : result.get(0);
    }
879554
def _get_key_info(self):
        
        if self._key_info_cache is not None:
            return self._key_info_cache

        errors = []

        # First try the agent.
        try:
            key_info = agent_key_info_from_key_id(self.key_id)
        except MantaError:
            _, ex, _ = sys.exc_info()
            errors.append(ex)
        else:
            self._key_info_cache = key_info
            return self._key_info_cache

        # Try loading from "~/.ssh/*".
        try:
            key_info = ssh_key_info_from_key_data(self.key_id)
        except MantaError:
            _, ex, _ = sys.exc_info()
            errors.append(ex)
        else:
            self._key_info_cache = key_info
            return self._key_info_cache

        raise MantaError("could not find key info for signing: %s" %
                         "; ".join(map(str, errors)))
265650
public RegionInfo queryRegionInfo(String accessKey, String bucket) throws QiniuException {
        RegionIndex index = new RegionIndex(accessKey, bucket);
        RegionInfo info = regions.get(index);
        if (info == null) {
            UCRet ret = getRegionJson(index);
            try {
                info = RegionInfo.buildFromUcRet(ret);
            } catch (Exception e) {
                e.printStackTrace();
            }

            if (info != null) {
                regions.put(index, info);
            }
        }
        return info;
    }
590060
function ltrim(key, start, stop, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return null;
  val.ltrim(start, stop);
  if(val.llen() === 0) {
    this.delKey(key, req);
  }
  return OK;
}
1046704
function srem(key /* member-1, member-N, req */) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null
    , val = this.getKey(key, req);
  if(val === undefined) return 0;
  var deleted = val.srem(args);
  if(val.scard() === 0) {
    this.delKey(key, req);
  }
  return deleted;
}
943265
public static PapayQuerycontractResult papayQuerycontract(PapayQuerycontract papayQuerycontract,String key){
		Map<String,String> map = MapUtil.objectToMap(papayQuerycontract);
		String sign = SignatureUtil.generateSign(map,papayQuerycontract.getSign_type(),key);
		papayQuerycontract.setSign(sign);
		String closeorderXML = XMLConverUtil.convertToXML(papayQuerycontract);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI()+ "/papay/querycontract")
				.setEntity(new StringEntity(closeorderXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,PapayQuerycontractResult.class,papayQuerycontract.getSign_type(),key);
	}
69558
function expectAliQueryKeys() {
    // can't query keys before bob has uploaded them
    expect(bobTestClient.deviceKeys).toBeTruthy();

    const bobKeys = {};
    bobKeys[bobDeviceId] = bobTestClient.deviceKeys;
    aliTestClient.httpBackend.when("POST", "/keys/query")
            .respond(200, function(path, content) {
        expect(content.device_keys[bobUserId]).toEqual(
            {},
            "Expected Alice to key query for " + bobUserId + ", got " +
            Object.keys(content.device_keys),
        );
        const result = {};
        result[bobUserId] = bobKeys;
        return {device_keys: result};
    });
    return aliTestClient.httpBackend.flush("/keys/query", 1);
}
272840
@Sensitive
    public static String getHeader(HttpServletRequest req, String key) {
        HttpServletRequest sr = getWrappedServletRequestObject(req);
        return sr.getHeader(key);
    }