2021-08-03 07:33:18 +00:00
|
|
|
package f0;
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
import com.discord.utilities.font.FontUtils;
|
|
|
|
import d0.g0.t;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.util.Comparator;
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
import kotlin.TypeCastException;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
/* compiled from: CipherSuite.kt */
|
|
|
|
public final class j {
|
|
|
|
public static final Comparator<String> a = new a();
|
|
|
|
|
2021-12-17 21:59:34 +00:00
|
|
|
/* renamed from: b reason: collision with root package name */
|
2022-02-10 02:59:54 +00:00
|
|
|
public static final Map<String, j> f3646b = new LinkedHashMap();
|
2021-12-17 21:59:34 +00:00
|
|
|
public static final j c;
|
2021-11-02 06:38:17 +00:00
|
|
|
public static final j d;
|
|
|
|
public static final j e;
|
|
|
|
public static final j f;
|
|
|
|
public static final j g;
|
|
|
|
public static final j h;
|
|
|
|
public static final j i;
|
|
|
|
public static final j j;
|
|
|
|
public static final j k;
|
|
|
|
public static final j l;
|
|
|
|
public static final j m;
|
|
|
|
public static final j n;
|
|
|
|
public static final j o;
|
|
|
|
public static final j p;
|
|
|
|
public static final j q;
|
|
|
|
public static final j r;
|
|
|
|
|
|
|
|
/* renamed from: s reason: collision with root package name */
|
2022-02-10 02:59:54 +00:00
|
|
|
public static final b f3647s;
|
2021-11-02 06:38:17 +00:00
|
|
|
public final String t;
|
|
|
|
|
|
|
|
/* compiled from: CipherSuite.kt */
|
|
|
|
public static final class a implements Comparator<String> {
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
|
|
|
|
@Override // java.util.Comparator
|
|
|
|
public int compare(String str, String str2) {
|
|
|
|
String str3 = str;
|
|
|
|
String str4 = str2;
|
|
|
|
m.checkParameterIsNotNull(str3, "a");
|
|
|
|
m.checkParameterIsNotNull(str4, "b");
|
|
|
|
int min = Math.min(str3.length(), str4.length());
|
|
|
|
int i = 4;
|
|
|
|
while (true) {
|
|
|
|
if (i < min) {
|
|
|
|
char charAt = str3.charAt(i);
|
|
|
|
char charAt2 = str4.charAt(i);
|
|
|
|
if (charAt == charAt2) {
|
|
|
|
i++;
|
|
|
|
} else if (charAt < charAt2) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
int length = str3.length();
|
|
|
|
int length2 = str4.length();
|
|
|
|
if (length == length2) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if (length < length2) {
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: CipherSuite.kt */
|
|
|
|
public static final class b {
|
|
|
|
public b(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final j a(b bVar, String str, int i) {
|
|
|
|
j jVar = new j(str, null);
|
2022-02-10 02:59:54 +00:00
|
|
|
j.f3646b.put(str, jVar);
|
2021-11-02 06:38:17 +00:00
|
|
|
return jVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final synchronized j b(String str) {
|
|
|
|
j jVar;
|
|
|
|
m.checkParameterIsNotNull(str, "javaName");
|
2022-02-10 02:59:54 +00:00
|
|
|
Map<String, j> map = j.f3646b;
|
2021-11-02 06:38:17 +00:00
|
|
|
jVar = map.get(str);
|
|
|
|
if (jVar == null) {
|
|
|
|
jVar = map.get(c(str));
|
|
|
|
if (jVar == null) {
|
|
|
|
jVar = new j(str, null);
|
|
|
|
}
|
|
|
|
map.put(str, jVar);
|
|
|
|
}
|
|
|
|
return jVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final String c(String str) {
|
|
|
|
if (t.startsWith$default(str, "TLS_", false, 2, null)) {
|
2021-12-17 21:59:34 +00:00
|
|
|
StringBuilder R = b.d.b.a.a.R("SSL_");
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str != null) {
|
|
|
|
String substring = str.substring(4);
|
|
|
|
m.checkExpressionValueIsNotNull(substring, "(this as java.lang.String).substring(startIndex)");
|
2021-11-05 06:48:17 +00:00
|
|
|
R.append(substring);
|
|
|
|
return R.toString();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
} else if (!t.startsWith$default(str, "SSL_", false, 2, null)) {
|
|
|
|
return str;
|
|
|
|
} else {
|
2021-12-17 21:59:34 +00:00
|
|
|
StringBuilder R2 = b.d.b.a.a.R("TLS_");
|
2021-11-02 06:38:17 +00:00
|
|
|
if (str != null) {
|
|
|
|
String substring2 = str.substring(4);
|
|
|
|
m.checkExpressionValueIsNotNull(substring2, "(this as java.lang.String).substring(startIndex)");
|
2021-11-05 06:48:17 +00:00
|
|
|
R2.append(substring2);
|
|
|
|
return R2.toString();
|
2021-11-02 06:38:17 +00:00
|
|
|
}
|
|
|
|
throw new TypeCastException("null cannot be cast to non-null type java.lang.String");
|
|
|
|
}
|
|
|
|
}
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
static {
|
|
|
|
b bVar = new b(null);
|
2022-02-10 02:59:54 +00:00
|
|
|
f3647s = bVar;
|
2021-11-02 06:38:17 +00:00
|
|
|
b.a(bVar, "SSL_RSA_WITH_NULL_MD5", 1);
|
|
|
|
b.a(bVar, "SSL_RSA_WITH_NULL_SHA", 2);
|
|
|
|
b.a(bVar, "SSL_RSA_EXPORT_WITH_RC4_40_MD5", 3);
|
|
|
|
b.a(bVar, "SSL_RSA_WITH_RC4_128_MD5", 4);
|
|
|
|
b.a(bVar, "SSL_RSA_WITH_RC4_128_SHA", 5);
|
|
|
|
b.a(bVar, "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", 8);
|
|
|
|
b.a(bVar, "SSL_RSA_WITH_DES_CBC_SHA", 9);
|
2021-12-17 21:59:34 +00:00
|
|
|
c = b.a(bVar, "SSL_RSA_WITH_3DES_EDE_CBC_SHA", 10);
|
2021-11-02 06:38:17 +00:00
|
|
|
b.a(bVar, "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA", 17);
|
|
|
|
b.a(bVar, "SSL_DHE_DSS_WITH_DES_CBC_SHA", 18);
|
|
|
|
b.a(bVar, "SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA", 19);
|
|
|
|
b.a(bVar, "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", 20);
|
|
|
|
b.a(bVar, "SSL_DHE_RSA_WITH_DES_CBC_SHA", 21);
|
|
|
|
b.a(bVar, "SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA", 22);
|
|
|
|
b.a(bVar, "SSL_DH_anon_EXPORT_WITH_RC4_40_MD5", 23);
|
|
|
|
b.a(bVar, "SSL_DH_anon_WITH_RC4_128_MD5", 24);
|
|
|
|
b.a(bVar, "SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA", 25);
|
|
|
|
b.a(bVar, "SSL_DH_anon_WITH_DES_CBC_SHA", 26);
|
|
|
|
b.a(bVar, "SSL_DH_anon_WITH_3DES_EDE_CBC_SHA", 27);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_DES_CBC_SHA", 30);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_3DES_EDE_CBC_SHA", 31);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_RC4_128_SHA", 32);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_DES_CBC_MD5", 34);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_3DES_EDE_CBC_MD5", 35);
|
|
|
|
b.a(bVar, "TLS_KRB5_WITH_RC4_128_MD5", 36);
|
|
|
|
b.a(bVar, "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA", 38);
|
|
|
|
b.a(bVar, "TLS_KRB5_EXPORT_WITH_RC4_40_SHA", 40);
|
|
|
|
b.a(bVar, "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5", 41);
|
|
|
|
b.a(bVar, "TLS_KRB5_EXPORT_WITH_RC4_40_MD5", 43);
|
|
|
|
d = b.a(bVar, "TLS_RSA_WITH_AES_128_CBC_SHA", 47);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_128_CBC_SHA", 50);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", 51);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_128_CBC_SHA", 52);
|
|
|
|
e = b.a(bVar, "TLS_RSA_WITH_AES_256_CBC_SHA", 53);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_256_CBC_SHA", 56);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", 57);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_256_CBC_SHA", 58);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_NULL_SHA256", 59);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_AES_128_CBC_SHA256", 60);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_AES_256_CBC_SHA256", 61);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", 64);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA", 65);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA", 68);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA", 69);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", 103);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256", 106);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", 107);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_128_CBC_SHA256", 108);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_256_CBC_SHA256", 109);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA", 132);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA", 135);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA", 136);
|
|
|
|
b.a(bVar, "TLS_PSK_WITH_RC4_128_SHA", 138);
|
|
|
|
b.a(bVar, "TLS_PSK_WITH_3DES_EDE_CBC_SHA", 139);
|
|
|
|
b.a(bVar, "TLS_PSK_WITH_AES_128_CBC_SHA", 140);
|
|
|
|
b.a(bVar, "TLS_PSK_WITH_AES_256_CBC_SHA", 141);
|
|
|
|
b.a(bVar, "TLS_RSA_WITH_SEED_CBC_SHA", FontUtils.MAX_FONT_SCALING);
|
|
|
|
f = b.a(bVar, "TLS_RSA_WITH_AES_128_GCM_SHA256", 156);
|
|
|
|
g = b.a(bVar, "TLS_RSA_WITH_AES_256_GCM_SHA384", 157);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", 158);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", 159);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256", 162);
|
|
|
|
b.a(bVar, "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384", 163);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_128_GCM_SHA256", 166);
|
|
|
|
b.a(bVar, "TLS_DH_anon_WITH_AES_256_GCM_SHA384", 167);
|
|
|
|
b.a(bVar, "TLS_EMPTY_RENEGOTIATION_INFO_SCSV", 255);
|
|
|
|
b.a(bVar, "TLS_FALLBACK_SCSV", 22016);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_NULL_SHA", 49153);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 49154);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", 49155);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA", 49156);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA", 49157);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_NULL_SHA", 49158);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA", 49159);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA", 49160);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", 49161);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", 49162);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_NULL_SHA", 49163);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_RC4_128_SHA", 49164);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA", 49165);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA", 49166);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA", 49167);
|
|
|
|
b.a(bVar, "TLS_ECDHE_RSA_WITH_NULL_SHA", 49168);
|
|
|
|
b.a(bVar, "TLS_ECDHE_RSA_WITH_RC4_128_SHA", 49169);
|
|
|
|
b.a(bVar, "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", 49170);
|
|
|
|
h = b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", 49171);
|
|
|
|
i = b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", 49172);
|
|
|
|
b.a(bVar, "TLS_ECDH_anon_WITH_NULL_SHA", 49173);
|
|
|
|
b.a(bVar, "TLS_ECDH_anon_WITH_RC4_128_SHA", 49174);
|
|
|
|
b.a(bVar, "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA", 49175);
|
|
|
|
b.a(bVar, "TLS_ECDH_anon_WITH_AES_128_CBC_SHA", 49176);
|
|
|
|
b.a(bVar, "TLS_ECDH_anon_WITH_AES_256_CBC_SHA", 49177);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", 49187);
|
|
|
|
b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", 49188);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256", 49189);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384", 49190);
|
|
|
|
b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", 49191);
|
|
|
|
b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", 49192);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256", 49193);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384", 49194);
|
|
|
|
j = b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", 49195);
|
|
|
|
k = b.a(bVar, "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", 49196);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256", 49197);
|
|
|
|
b.a(bVar, "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384", 49198);
|
|
|
|
l = b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", 49199);
|
|
|
|
m = b.a(bVar, "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", 49200);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256", 49201);
|
|
|
|
b.a(bVar, "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384", 49202);
|
|
|
|
b.a(bVar, "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA", 49205);
|
|
|
|
b.a(bVar, "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA", 49206);
|
|
|
|
n = b.a(bVar, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 52392);
|
|
|
|
o = b.a(bVar, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", 52393);
|
|
|
|
b.a(bVar, "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 52394);
|
|
|
|
b.a(bVar, "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256", 52396);
|
|
|
|
p = b.a(bVar, "TLS_AES_128_GCM_SHA256", 4865);
|
|
|
|
q = b.a(bVar, "TLS_AES_256_GCM_SHA384", 4866);
|
|
|
|
r = b.a(bVar, "TLS_CHACHA20_POLY1305_SHA256", 4867);
|
|
|
|
b.a(bVar, "TLS_AES_128_CCM_SHA256", 4868);
|
|
|
|
b.a(bVar, "TLS_AES_128_CCM_8_SHA256", 4869);
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
public j(String str, DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this.t = str;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2021-11-02 06:38:17 +00:00
|
|
|
return this.t;
|
2021-08-03 07:33:18 +00:00
|
|
|
}
|
|
|
|
}
|