- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
70 lines
1.7 KiB
Java
70 lines
1.7 KiB
Java
package com.ironsource.sdk.controller;
|
|
|
|
import com.ironsource.bl;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import java.security.MessageDigest;
|
|
import java.util.UUID;
|
|
|
|
/* loaded from: classes4.dex */
|
|
final class s {
|
|
private static final String b = "MD5";
|
|
private String a;
|
|
|
|
public s(String str) {
|
|
this.a = str;
|
|
}
|
|
|
|
public static String a() {
|
|
return UUID.randomUUID().toString();
|
|
}
|
|
|
|
private String a(String str) {
|
|
try {
|
|
return bl.a(str);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return b(str);
|
|
}
|
|
}
|
|
|
|
private String a(byte[] bArr) throws Exception {
|
|
StringBuilder sb = new StringBuilder();
|
|
for (byte b2 : bArr) {
|
|
String hexString = Integer.toHexString(b2 & 255);
|
|
if (hexString.length() < 2) {
|
|
hexString = "0" + hexString;
|
|
}
|
|
sb.append(hexString);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
private String b(String str) {
|
|
try {
|
|
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
|
|
messageDigest.update(str.getBytes());
|
|
return a(messageDigest.digest());
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public boolean a(String str, String str2, String str3) {
|
|
try {
|
|
return str3.equalsIgnoreCase(a(str + str2 + this.a));
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public String b() {
|
|
return this.a;
|
|
}
|
|
}
|