131 lines
5.4 KiB
Java
131 lines
5.4 KiB
Java
package o;
|
|
|
|
import java.io.IOException;
|
|
import java.security.AccessController;
|
|
import java.security.PrivilegedAction;
|
|
import java.security.Provider;
|
|
import java.security.PublicKey;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class gqX extends Provider {
|
|
private static final String[] a;
|
|
private static final String[] b;
|
|
private static final String[] c;
|
|
private static final String[] d;
|
|
private static final String[] e;
|
|
private static final String[] f;
|
|
private static String g = "BouncyCastle Security Provider v1.54";
|
|
private static final Map h;
|
|
private static final String[] i;
|
|
|
|
static /* synthetic */ void a(gqX gqx) {
|
|
gqx.b("org.spongycastle.jcajce.provider.digest.", a);
|
|
gqx.b("org.spongycastle.jcajce.provider.symmetric.", i);
|
|
gqx.b("org.spongycastle.jcajce.provider.symmetric.", f);
|
|
gqx.b("org.spongycastle.jcajce.provider.symmetric.", b);
|
|
gqx.b("org.spongycastle.jcajce.provider.asymmetric.", c);
|
|
gqx.b("org.spongycastle.jcajce.provider.asymmetric.", e);
|
|
gqx.b("org.spongycastle.jcajce.provider.keystore.", d);
|
|
gqx.put("X509Store.CERTIFICATE/COLLECTION", "o.grC");
|
|
gqx.put("X509Store.ATTRIBUTECERTIFICATE/COLLECTION", "o.gry");
|
|
gqx.put("X509Store.CRL/COLLECTION", "o.grA");
|
|
gqx.put("X509Store.CERTIFICATEPAIR/COLLECTION", "o.grG");
|
|
gqx.put("X509Store.CERTIFICATE/LDAP", "o.grL");
|
|
gqx.put("X509Store.CRL/LDAP", "o.grH");
|
|
gqx.put("X509Store.ATTRIBUTECERTIFICATE/LDAP", "o.grD");
|
|
gqx.put("X509Store.CERTIFICATEPAIR/LDAP", "o.grF");
|
|
gqx.put("X509StreamParser.CERTIFICATE", "o.grB");
|
|
gqx.put("X509StreamParser.ATTRIBUTECERTIFICATE", "o.grv");
|
|
gqx.put("X509StreamParser.CRL", "o.gru");
|
|
gqx.put("X509StreamParser.CERTIFICATEPAIR", "o.grx");
|
|
gqx.put("Cipher.BROKENPBEWITHMD5ANDDES", "o.grc$RVV");
|
|
gqx.put("Cipher.BROKENPBEWITHSHA1ANDDES", "o.grc$HBt");
|
|
gqx.put("Cipher.OLDPBEWITHSHAANDTWOFISH-CBC", "o.grc$LWm");
|
|
gqx.put("CertPathValidator.RFC3281", "o.gre");
|
|
gqx.put("CertPathBuilder.RFC3281", "o.grd");
|
|
gqx.put("CertPathValidator.RFC3280", "o.grk");
|
|
gqx.put("CertPathBuilder.RFC3280", "o.gro");
|
|
gqx.put("CertPathValidator.PKIX", "o.grk");
|
|
gqx.put("CertPathBuilder.PKIX", "o.gro");
|
|
gqx.put("CertStore.Collection", "o.grb");
|
|
gqx.put("CertStore.LDAP", "o.grw");
|
|
gqx.put("CertStore.Multi", "o.grj");
|
|
gqx.put("Alg.Alias.CertStore.X509LDAP", "LDAP");
|
|
}
|
|
|
|
static {
|
|
new gqU();
|
|
h = new HashMap();
|
|
i = new String[]{"PBEPBKDF2", "PBEPKCS12"};
|
|
f = new String[]{"SipHash"};
|
|
b = new String[]{"AES", "ARC4", "Blowfish", "Camellia", "CAST5", "CAST6", "ChaCha", "DES", "DESede", "GOST28147", "Grainv1", "Grain128", "HC128", "HC256", "IDEA", "Noekeon", "RC2", "RC5", "RC6", "Rijndael", "Salsa20", "SEED", "Serpent", "Shacal2", "Skipjack", "SM4", "TEA", "Twofish", "Threefish", "VMPC", "VMPCKSA3", "XTEA", "XSalsa20", "OpenSSLPBKDF"};
|
|
c = new String[]{"X509", "IES"};
|
|
e = new String[]{"DSA", "DH", "EC", "RSA", "GOST", "ECGOST", "ElGamal", "DSTU4145"};
|
|
a = new String[]{"GOST3411", "Keccak", "MD2", "MD4", "MD5", "SHA1", "RIPEMD128", "RIPEMD160", "RIPEMD256", "RIPEMD320", "SHA224", "SHA256", "SHA384", "SHA512", "SHA3", "Skein", "SM3", "Tiger", "Whirlpool", "Blake2b"};
|
|
d = new String[]{BouncyCastleProvider.PROVIDER_NAME, "PKCS12"};
|
|
}
|
|
|
|
public gqX() {
|
|
super("SC", 1.54d, g);
|
|
AccessController.doPrivileged(new PrivilegedAction(this) { // from class: o.gqX.1
|
|
private gqX e;
|
|
|
|
{
|
|
this.e = this;
|
|
}
|
|
|
|
@Override // java.security.PrivilegedAction
|
|
public final Object run() {
|
|
gqX.a(this.e);
|
|
return null;
|
|
}
|
|
});
|
|
}
|
|
|
|
private void b(String str, String[] strArr) {
|
|
Class<?> cls;
|
|
for (int i2 = 0; i2 != strArr.length; i2++) {
|
|
try {
|
|
ClassLoader classLoader = getClass().getClassLoader();
|
|
if (classLoader != null) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(str);
|
|
sb.append(strArr[i2]);
|
|
sb.append("$Mappings");
|
|
cls = classLoader.loadClass(sb.toString());
|
|
} else {
|
|
StringBuilder sb2 = new StringBuilder();
|
|
sb2.append(str);
|
|
sb2.append(strArr[i2]);
|
|
sb2.append("$Mappings");
|
|
cls = Class.forName(sb2.toString());
|
|
}
|
|
} catch (ClassNotFoundException unused) {
|
|
cls = null;
|
|
}
|
|
if (cls != null) {
|
|
try {
|
|
} catch (Exception e2) {
|
|
StringBuilder sb3 = new StringBuilder("cannot create instance of ");
|
|
sb3.append(str);
|
|
sb3.append(strArr[i2]);
|
|
sb3.append("$Mappings : ");
|
|
sb3.append(e2);
|
|
throw new InternalError(sb3.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public static PublicKey b(gpZ gpz) throws IOException {
|
|
gqN gqn = (gqN) h.get(gpz.e.e);
|
|
if (gqn == null) {
|
|
return null;
|
|
}
|
|
return gqn.a();
|
|
}
|
|
}
|