kongdeqiang
2023-03-02 ee83188936c8ac306144f6c8cd119b6d7574dfc6
src/main/java/com/boying/util/MD5Util.java
@@ -62,7 +62,7 @@
         resultString = byteArrayToHexString(md.digest(resultString
               .getBytes()));
      } catch (Exception ex) {
         System.out.println(ex);
         //System.out.println(ex);
      }
      return resultString;
   }
@@ -137,8 +137,8 @@
   public static void main(String[] args) {
      String s ="amt=1.00&notifyUrl=http://test/payNotify&payKey=3ed6f127559e4f2f80e5e1cb0231b76b&payerName=tom&payerNum=54c51b276a9a47329b295662122968e1&payerTypeCode=130000451000011&paySecret=492f497a17cc41d19a757ae9d5809238";
      System.out.println(encode(s));
      //System.out.println(encode(s));
      String s2="amt=1.00&notifyUrl=http://test/payNotify&payKey=3ed6f127559e4f2f80e5e1cb0231b76b&paySecret=492f497a17cc41d19a757ae9d5809238&payerName=峰峰&payerNum=3aa0f6499acb45f686b6442229d23b31&payerTypeCode=130000451000012";
      System.out.println(DigestUtils.md5DigestAsHex(s.toString().getBytes()));
      //System.out.println(DigestUtils.md5DigestAsHex(s.toString().getBytes()));
   }
}