|
|
|
|
@ -8,8 +8,6 @@ import android.util.Base64; |
|
|
|
|
|
|
|
|
|
import com.github.catvod.Init; |
|
|
|
|
|
|
|
|
|
import org.mozilla.universalchardet.UniversalDetector; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.FileInputStream; |
|
|
|
|
import java.math.BigInteger; |
|
|
|
|
@ -17,7 +15,6 @@ import java.net.Inet4Address; |
|
|
|
|
import java.net.InetAddress; |
|
|
|
|
import java.net.NetworkInterface; |
|
|
|
|
import java.net.SocketException; |
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
|
import java.security.MessageDigest; |
|
|
|
|
import java.security.NoSuchAlgorithmException; |
|
|
|
|
import java.util.Enumeration; |
|
|
|
|
@ -68,17 +65,6 @@ public class Util { |
|
|
|
|
return md5(Path.jar(name)).equalsIgnoreCase(md5); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static byte[] utf8(byte[] bytes) { |
|
|
|
|
try { |
|
|
|
|
UniversalDetector detector = new UniversalDetector(null); |
|
|
|
|
detector.handleData(bytes, 0, bytes.length); |
|
|
|
|
detector.dataEnd(); |
|
|
|
|
return new String(bytes, detector.getDetectedCharset()).getBytes(StandardCharsets.UTF_8); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
return bytes; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static String md5(String src) { |
|
|
|
|
try { |
|
|
|
|
if (TextUtils.isEmpty(src)) return ""; |
|
|
|
|
|