コード例 #1
0
 private String getStrToSign(HttpServletRequest request) {
   try {
     this.body =
         GetPostBody(
             request.getInputStream(), Integer.parseInt(request.getHeader("content-length")));
   } catch (IOException e) {
     log.error(e.getMessage());
     return null;
   }
   String queryString = request.getQueryString();
   String uri = request.getRequestURI();
   String decodeUri;
   try {
     decodeUri = java.net.URLDecoder.decode(uri, "UTF-8");
   } catch (UnsupportedEncodingException e) {
     log.error(e.getMessage());
     return null;
   }
   String authStr = decodeUri;
   if (queryString != null && !queryString.equals("")) {
     authStr += "?" + queryString;
   }
   authStr += "\n" + this.body;
   return authStr;
 }
コード例 #2
0
 public static byte[] func_75895_a(String p_75895_0_, PublicKey p_75895_1_, SecretKey p_75895_2_) {
   try {
     return func_75893_a(
         "SHA-1",
         new byte[][] {
           p_75895_0_.getBytes("ISO_8859_1"), p_75895_2_.getEncoded(), p_75895_1_.getEncoded()
         });
   } catch (UnsupportedEncodingException unsupportedencodingexception) {
     unsupportedencodingexception.printStackTrace();
   }
   return null;
 }