From 3f41182984d69d7fae703776edd1591f48dff93f Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期三, 22 十一月 2023 17:13:05 +0800
Subject: [PATCH] 2023年11月22日17:12:40

---
 app/src/main/java/com/hdl/photovoltaic/utils/Md5Utils.java |   72 -----------------------------------
 1 files changed, 1 insertions(+), 71 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/utils/HDLMD5Utils.java b/app/src/main/java/com/hdl/photovoltaic/utils/Md5Utils.java
similarity index 73%
rename from app/src/main/java/com/hdl/photovoltaic/utils/HDLMD5Utils.java
rename to app/src/main/java/com/hdl/photovoltaic/utils/Md5Utils.java
index c51dfcf..34a1a39 100644
--- a/app/src/main/java/com/hdl/photovoltaic/utils/HDLMD5Utils.java
+++ b/app/src/main/java/com/hdl/photovoltaic/utils/Md5Utils.java
@@ -2,13 +2,12 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 
-public class HDLMD5Utils {
+public class Md5Utils {
     /**
      * MD5杞瓧绗︿覆
      */
@@ -107,73 +106,4 @@
     }
 
 
-
-
-    public final static String md5(String plainText) {
-
-// 杩斿洖瀛楃涓�
-
-        String md5Str = null;
-
-        try {
-
-// 鎿嶄綔瀛楃涓�
-
-            StringBuffer buf = new StringBuffer();
-
-            MessageDigest md =
-
-                    MessageDigest.getInstance("MD5");
-
-// 娣诲姞瑕佽繘琛岃绠楁憳瑕佺殑淇℃伅,浣跨敤 plainText 鐨� byte
-
-
-            md.update(plainText.getBytes());
-
-// 璁$畻鍑烘憳瑕�,瀹屾垚鍝堝笇璁$畻銆�
-
-            byte b[] = md.digest();
-
-            int i;
-
-            for (int offset = 0; offset < b.length; offset++) {
-
-                i = b[offset];
-
-                if (i < 0) {
-
-                    i += 256;
-
-                }
-
-                if (i < 16) {
-
-                    buf.append("0");
-
-                }
-
-// 灏嗘暣鍨� 鍗佽繘鍒� i
-
-
-                buf.append(Integer.toHexString(i));
-
-            }
-
-// 32浣嶇殑鍔犲瘑
-
-            md5Str = buf.toString();
-
-// 16浣嶇殑鍔犲瘑
-
-// md5Str =  buf.toString().md5Strstring(8,24);
-
-        } catch (Exception e) {
-
-            e.printStackTrace();
-
-        }
-
-        return md5Str;
-
-    }
 }

--
Gitblit v1.8.0