package com.ubtech.utils; /* loaded from: classes2.dex */ public class EncryptUtils { /* JADX WARN: Not initialized variable reg: 4, insn: 0x0049: MOVE (r1 I:??[OBJECT, ARRAY]) = (r4 I:??[OBJECT, ARRAY]), block:B:32:0x0049 */ /* JADX WARN: Removed duplicated region for block: B:35:0x004c A[EXC_TOP_SPLITTER, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public static java.lang.String a(java.io.File r7) { /* boolean r0 = r7.isFile() r1 = 0 if (r0 != 0) goto L8 return r1 L8: r0 = 1024(0x400, float:1.435E-42) byte[] r2 = new byte[r0] java.lang.String r3 = "MD5" java.security.MessageDigest r3 = java.security.MessageDigest.getInstance(r3) // Catch: java.lang.Throwable -> L36 java.lang.Exception -> L38 java.io.FileInputStream r4 = new java.io.FileInputStream // Catch: java.lang.Throwable -> L36 java.lang.Exception -> L38 r4.(r7) // Catch: java.lang.Throwable -> L36 java.lang.Exception -> L38 L17: r7 = 0 int r5 = r4.read(r2, r7, r0) // Catch: java.lang.Exception -> L34 java.lang.Throwable -> L48 r6 = -1 if (r5 == r6) goto L23 r3.update(r2, r7, r5) // Catch: java.lang.Exception -> L34 java.lang.Throwable -> L48 goto L17 L23: r4.close() // Catch: java.lang.Exception -> L27 goto L2b L27: r7 = move-exception r7.printStackTrace() L2b: byte[] r7 = r3.digest() java.lang.String r7 = a(r7) return r7 L34: r7 = move-exception goto L3a L36: r7 = move-exception goto L4a L38: r7 = move-exception r4 = r1 L3a: r7.printStackTrace() // Catch: java.lang.Throwable -> L48 if (r4 == 0) goto L47 r4.close() // Catch: java.lang.Exception -> L43 goto L47 L43: r7 = move-exception r7.printStackTrace() L47: return r1 L48: r7 = move-exception r1 = r4 L4a: if (r1 == 0) goto L54 r1.close() // Catch: java.lang.Exception -> L50 goto L54 L50: r0 = move-exception r0.printStackTrace() L54: throw r7 */ throw new UnsupportedOperationException("Method not decompiled: com.ubtech.utils.EncryptUtils.a(java.io.File):java.lang.String"); } private static String a(byte[] bArr) { StringBuilder sb = new StringBuilder(""); if (bArr == null || bArr.length <= 0) { return null; } for (byte b : bArr) { String hexString = Integer.toHexString(b & 255); if (hexString.length() < 2) { sb.append(0); } sb.append(hexString); } return sb.toString(); } }