Info Call to Crypto API

Description

List of all calls to cryptographic methods.

Recommendation

Do not use insecure or weak cryptographic algorithms. For example, the Data Encryption Standard (DES) encryption algorithm is considered highly insecure

Do not use Object.equals() to compare cryptographic keys

Cryptographic keys should never be serialized

Technical details

Method com.fitbit.coin.kit.internal.ui.fingerprint.a.a() calling method javax.crypto.Cipher.getInstance()


    static final synthetic javax.crypto.Cipher a(javax.crypto.SecretKey p2)
    {
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/ECB/PKCS7Padding", "BC");
        v0_1.init(2, p2);
        return v0_1;
    }

Method com.fitbit.coin.kit.internal.device.cw.a() calling method javax.crypto.Cipher.doFinal()


    private byte[] a(javax.crypto.Cipher p3, String p4)
    {
        byte[] v1 = new byte[0];
        try {
            byte[] v3_1 = p3.doFinal(android.util.Base64.decode(p4, 0));
        } catch (byte[] v3_2) {
            Object[] v0_1 = new Object[0];
            d.a.b.e(v3_2, "PIN decryption failed", v0_1);
            v3_1 = v1;
        }
        return v3_1;
    }

Method com.fitbit.coin.kit.internal.device.cw.a() calling method javax.crypto.Cipher.doFinal()


    static final synthetic byte[] a(byte[] p4, java.security.PublicKey p5)
    {
        byte[] v0_2 = new byte[(p4.length + 1)];
        v0_2[0] = 10;
        System.arraycopy(p4, 0, v0_2, 1, p4.length);
        byte[] v4_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v4_1.init(1, p5);
        return v4_1.doFinal(v0_2);
    }

Method com.fitbit.coin.kit.internal.device.cw.a() calling method javax.crypto.Cipher.doFinal()


    final synthetic io.reactivex.g a(byte[] p1, com.fitbit.coin.kit.internal.device.PaymentDeviceId p2, javax.crypto.Cipher p3)
    {
        return this.e.a(ark>com.fitbit.coin.kit.internal.device.cwark>.j(p2), android.util.Base64.encodeToString(p3.doFinal(p1), 0));
    }

Method com.fitbit.coin.kit.internal.ui.fingerprint.a.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    final synthetic javax.crypto.SecretKey a(String p3)
    {
        return new javax.crypto.spec.SecretKeySpec(this.b(android.util.Base64.decode(p3, 0)), "AES");
    }

Method com.fitbit.data.encoders.SecureDataCoder.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public boolean a(android.content.Context p4)
    {
        if (p4 != 0) {
            this.g = p4.getApplicationContext();
            try {
                this.d = java.security.MessageDigest.getInstance(ark>com.fitbit.data.encoders.SecureDataCoderark>.b);
                this.e = javax.crypto.Cipher.getInstance(ark>com.fitbit.data.encoders.SecureDataCoderark>.a);
                javax.crypto.spec.SecretKeySpec v1_2 = new StringBuilder();
                v1_2.append(this.a());
                v1_2.append(this.b(p4));
                int v4_4 = this.c(v1_2.toString().getBytes());
            } catch (int v4_5) {
                String v2_1 = new Object[0];
                d.a.b.b(v4_5, "Unable to init cipher", v2_1);
                return 0;
            }
            if (v4_4 != 0) {
                this.f = new javax.crypto.spec.SecretKeySpec(v4_4, ark>com.fitbit.data.encoders.SecureDataCoderark>.a);
                Object[] v0_1 = new Object[0];
                d.a.b.b("Key successfully initialized", v0_1);
                return 1;
            } else {
                javax.crypto.spec.SecretKeySpec v1_7 = new Object[0];
                d.a.b.b("Unable to init key. Hash is null", v1_7);
                return 0;
            }
        } else {
            javax.crypto.spec.SecretKeySpec v1_8 = new Object[0];
            d.a.b.b("Request to init with null context", v1_8);
            return 0;
        }
    }

Method com.fitbit.httpcore.a.v.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private static String a(byte[] p3, String p4)
    {
        javax.crypto.spec.SecretKeySpec v1_1 = new javax.crypto.spec.SecretKeySpec(ark>com.fitbit.httpcore.a.vark>.a().getBytes("UTF-8"), p4);
        String v4_3 = javax.crypto.Mac.getInstance(p4);
        v4_3.init(v1_1);
        return new String(org.spongycastle.util.encoders.a.b(v4_3.doFinal(p3)));
    }

Method com.fitbit.mobiledata.m.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public javax.crypto.SecretKey a(String p5, long p6)
    {
        Object[] v1_2 = new Object[2];
        v1_2[0] = Long.valueOf(p6);
        v1_2[1] = p5;
        d.a.b.b("Get Key ID %d, BT Address: %s", v1_2);
        com.fitbit.savedstate.u v0_3 = ((java.security.KeyStore) this.j.get());
        if (v0_3 == null) {
            Object[] v1_1 = new Object[0];
            d.a.b.b("Keystore was null!", v1_1);
            byte[] v5_2 = this.h.a(this.c(p5, p6));
            if (v5_2 != null) {
                return new javax.crypto.spec.SecretKeySpec(android.util.Base64.decode(v5_2, 0), "AES");
            } else {
                return 0;
            }
        } else {
            return this.a(v0_3, p5, p6);
        }
    }

Method com.fitbit.mobiledata.m.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public void a(com.fitbit.serverinteraction.PublicAPI p15, com.fitbit.data.bl.bi p16, String p17, String p18)
    {
        void v6 = this;
        if (this.i.e()) {
            void v0_17 = p15.u(p17);
            String v3_0 = new Object[1];
            v3_0[0] = v0_17.toString();
            d.a.b.b("key json : %s", v3_0);
            void v0_1 = p16.S(v0_17);
            String v1_6 = android.util.Base64.decode(((String) ((android.util.Pair) v0_1.get(0)).first), 0);
            byte[] v8 = android.util.Base64.decode(((String) ((android.util.Pair) v0_1.get(1)).first), 0);
            long v9 = ((Long) ((android.util.Pair) v0_1.get(0)).second).longValue();
            long v11 = ((Long) ((android.util.Pair) v0_1.get(1)).second).longValue();
            java.security.KeyStore v13_1 = ((java.security.KeyStore) this.j.get());
            if (v13_1 == null) {
                this.h.a(android.util.Base64.encodeToString(v1_6, 0), this.c(p18, v9));
                this.h.a(android.util.Base64.encodeToString(v8, 0), this.c(p18, v11));
            } else {
                String v1_10 = v13_1;
                this.a(v1_10, new javax.crypto.spec.SecretKeySpec(v1_6, "AES"), p18, v9);
                this.a(v1_10, new javax.crypto.spec.SecretKeySpec(v8, "AES"), p18, v11);
                v6 = this.a(v13_1);
            }
            v6.b(p18, v9, v11);
            return;
        } else {
            return;
        }
    }

Method com.fitbit.mobiledata.o.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public boolean a(int p9, String p10)
    {
        try {
            String v2_1 = this.m.e();
            org.spongycastle.crypto.l.a v3_1 = new java.security.SecureRandom();
        } catch (String v9_7) {
            Object[] v0_4 = new Object[0];
            d.a.b.e(v9_7, "Keystore failure", v0_4);
            return 0;
        } catch (String v9_5) {
            Object[] v0_3 = new Object[0];
            d.a.b.e(v9_5, "Interrupted during keystore load", v0_3);
            Thread.currentThread().interrupt();
            return 0;
        } catch (Object[] v10_3) {
            if (!com.fitbit.config.Config.a.a()) {
                Object[] v10_4 = new Object[0];
                d.a.b.b("MobileData file read/write failure", v10_4);
            } else {
                Object[] v0_2 = new Object[1];
                v0_2[0] = Integer.valueOf(p9);
                d.a.b.e(v10_3, "File for mobile data protocol version %d could not be created", v0_2);
            }
            return 0;
        } catch (Object[] v10_1) {
            if (!com.fitbit.config.Config.a.a()) {
                Object[] v10_2 = new Object[0];
                d.a.b.b("MobileData file read/write failure", v10_2);
            } else {
                Object[] v0_1 = new Object[1];
                v0_1[0] = Integer.valueOf(p9);
                d.a.b.e(v10_1, "IOException writing mobile data protocol version %d not found", v0_1);
            }
            return 0;
        }
        if (v2_1 == null) {
            String v2_14 = new byte[16];
            v3_1.nextBytes(v2_14);
            java.io.FileOutputStream v5_1 = new javax.crypto.spec.SecretKeySpec(v2_14, "AES");
            this.m.a(v5_1);
            v2_1 = v5_1;
        }
        java.io.FileOutputStream v5_3 = this.l.openFileOutput(this.d(p9), 0);
        org.spongycastle.crypto.j.h v6_3 = new org.spongycastle.crypto.j.h(new org.spongycastle.crypto.engines.b());
        org.spongycastle.crypto.l.aw v7_3 = new org.spongycastle.crypto.l.aw(v2_1.getEncoded());
        String v2_10 = new byte[16];
        v3_1.nextBytes(v2_10);
        v5_3.write(v2_10);
        v6_3.a(1, new org.spongycastle.crypto.l.a(v7_3, 128, v2_10));
        Object[] v10_7 = p10.getBytes(ark>com.fitbit.mobiledata.oark>.h);
        String v2_13 = new org.spongycastle.crypto.io.b(v5_3, v6_3);
        v2_13.write(v10_7);
        v2_13.close();
        return 1;
    }

Method okio.ByteString.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private ark>okio.ByteStringark> a(String p3, ark>okio.ByteStringark> p4)
    {
        try {
            javax.crypto.Mac v0 = javax.crypto.Mac.getInstance(p3);
            v0.init(new javax.crypto.spec.SecretKeySpec(p4.l(), p3));
            return ark>okio.ByteStringark>.a(v0.doFinal(this.data));
        } catch (java.security.InvalidKeyException v3_3) {
            throw new AssertionError(v3_3);
        } catch (java.security.InvalidKeyException v3_2) {
            throw new IllegalArgumentException(v3_2);
        }
    }

Method org.apache.commons.codec.digest.d.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.Mac a(String p1, byte[] p2)
    {
        if (p2 != null) {
            try {
                javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p2, p1);
                java.security.InvalidKeyException v1_4 = javax.crypto.Mac.getInstance(p1);
                v1_4.init(v0_1);
                return v1_4;
            } catch (java.security.InvalidKeyException v1_1) {
                throw new IllegalArgumentException(v1_1);
            } catch (java.security.InvalidKeyException v1_5) {
                throw new IllegalArgumentException(v1_5);
            }
        } else {
            throw new IllegalArgumentException("Null key");
        }
    }

Method okio.c.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private okio.ByteString a(String p5, okio.ByteString p6)
    {
        try {
            javax.crypto.Mac v0 = javax.crypto.Mac.getInstance(p5);
            v0.init(new javax.crypto.spec.SecretKeySpec(p6.l(), p5));
        } catch (java.security.NoSuchAlgorithmException) {
            throw new AssertionError();
        } catch (okio.u v5_5) {
            throw new IllegalArgumentException(v5_5);
        }
        if (this.b != null) {
            v0.update(this.b.c, this.b.d, (this.b.e - this.b.d));
            okio.u v5_2 = this.b;
            while(true) {
                v5_2 = v5_2.h;
                if (v5_2 == this.b) {
                    break;
                }
                v0.update(v5_2.c, v5_2.d, (v5_2.e - v5_2.d));
            }
        }
        return okio.ByteString.a(v0.doFinal());
    }

Method okio.l.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private l(okio.w p2, okio.ByteString p3, String p4)
    {
        super(p2);
        try {
            super.b = javax.crypto.Mac.getInstance(p4);
            super.b.init(new javax.crypto.spec.SecretKeySpec(p3.l(), p4));
            super.a = 0;
            return;
        } catch (java.security.NoSuchAlgorithmException) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v2_2) {
            throw new IllegalArgumentException(v2_2);
        }
    }

Method okio.m.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private m(okio.x p2, okio.ByteString p3, String p4)
    {
        super(p2);
        try {
            super.b = javax.crypto.Mac.getInstance(p4);
            super.b.init(new javax.crypto.spec.SecretKeySpec(p3.l(), p4));
            super.a = 0;
            return;
        } catch (java.security.NoSuchAlgorithmException) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v2_2) {
            throw new IllegalArgumentException(v2_2);
        }
    }

Method org.spongycastle.jcajce.provider.asymmetric.util.a.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(String p9)
    {
        javax.crypto.spec.SecretKeySpec v1_2;
        int v0_1 = this.a(this.a);
        javax.crypto.spec.SecretKeySpec v1_3 = org.spongycastle.util.Strings.b(p9);
        if (!org.spongycastle.jcajce.provider.asymmetric.util.a.f.containsKey(v1_3)) {
            v1_2 = p9;
        } else {
            v1_2 = ((org.spongycastle.asn1.p) org.spongycastle.jcajce.provider.asymmetric.util.a.f.get(v1_3)).b();
        }
        int v2_1 = org.spongycastle.jcajce.provider.asymmetric.util.a.b(v1_2);
        if (this.i == null) {
            if (v2_1 > 0) {
                int v2_3 = new byte[(v2_1 / 8)];
                System.arraycopy(v0_1, 0, v2_3, 0, v2_3.length);
                v0_1 = v2_3;
            }
        } else {
            if (v2_1 >= 0) {
                int v3_3 = new byte[(v2_1 / 8)];
                if (!(this.i instanceof org.spongycastle.crypto.a.b.c)) {
                    this.i.a(new org.spongycastle.crypto.l.av(v0_1, this.b));
                } else {
                    try {
                        this.i.a(new org.spongycastle.crypto.a.b.b(new org.spongycastle.asn1.p(v1_2), v2_1, v0_1, this.b));
                    } catch (IllegalArgumentException) {
                        int v0_5 = new StringBuilder();
                        v0_5.append("no OID for algorithm: ");
                        v0_5.append(v1_2);
                        throw new java.security.NoSuchAlgorithmException(v0_5.toString());
                    }
                }
                this.i.a(v3_3, 0, v3_3.length);
                v0_1 = v3_3;
            } else {
                int v0_9 = new StringBuilder();
                v0_9.append("unknown algorithm encountered: ");
                v0_9.append(v1_2);
                throw new java.security.NoSuchAlgorithmException(v0_9.toString());
            }
        }
        if (org.spongycastle.jcajce.provider.asymmetric.util.a.g.containsKey(v1_2)) {
            org.spongycastle.crypto.l.i.a(v0_1);
        }
        return new javax.crypto.spec.SecretKeySpec(v0_1, org.spongycastle.jcajce.provider.asymmetric.util.a.a(p9));
    }

Method org.spongycastle.jcajce.provider.asymmetric.util.c.engineUnwrap() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.Key engineUnwrap(byte[] p4, String p5, int p6)
    {
        try {
            java.security.InvalidKeyException v4_17;
            if (this.b != null) {
                v4_17 = this.b.b(p4, 0, p4.length);
            } else {
                v4_17 = this.engineDoFinal(p4, 0, p4.length);
            }
        } catch (java.security.InvalidKeyException v4_12) {
            throw new java.security.InvalidKeyException(v4_12.getMessage());
        } catch (java.security.InvalidKeyException v4_10) {
            throw new java.security.InvalidKeyException(v4_10.getMessage());
        } catch (java.security.InvalidKeyException v4_1) {
            throw new java.security.InvalidKeyException(v4_1.getMessage());
        }
        if (p6 != 3) {
            if ((!p5.equals("")) || (p6 != 2)) {
                try {
                    String v5_11 = this.d.g(p5);
                } catch (java.security.InvalidKeyException v4_25) {
                    java.security.spec.PKCS8EncodedKeySpec v6_14 = new StringBuilder();
                    v6_14.append("Unknown key type ");
                    v6_14.append(v4_25.getMessage());
                    throw new java.security.InvalidKeyException(v6_14.toString());
                } catch (java.security.InvalidKeyException v4_22) {
                    java.security.spec.PKCS8EncodedKeySpec v6_12 = new StringBuilder();
                    v6_12.append("Unknown key type ");
                    v6_12.append(v4_22.getMessage());
                    throw new java.security.InvalidKeyException(v6_12.toString());
                } catch (java.security.InvalidKeyException v4_19) {
                    java.security.spec.PKCS8EncodedKeySpec v6_10 = new StringBuilder();
                    v6_10.append("Unknown key type ");
                    v6_10.append(v4_19.getMessage());
                    throw new java.security.InvalidKeyException(v6_10.toString());
                }
                if (p6 != 1) {
                    if (p6 != 2) {
                        String v5_13 = new StringBuilder();
                        v5_13.append("Unknown key type ");
                        v5_13.append(p6);
                        throw new java.security.InvalidKeyException(v5_13.toString());
                    } else {
                        return v5_11.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(v4_17));
                    }
                } else {
                    return v5_11.generatePublic(new java.security.spec.X509EncodedKeySpec(v4_17));
                }
            } else {
                try {
                    java.security.InvalidKeyException v4_2 = org.spongycastle.asn1.x.u.a(v4_17);
                    String v5_1 = org.spongycastle.jce.provider.BouncyCastleProvider.a(v4_2);
                } catch (Exception) {
                    throw new java.security.InvalidKeyException("Invalid key encoding.");
                }
                if (v5_1 == null) {
                    java.security.spec.PKCS8EncodedKeySpec v6_2 = new StringBuilder();
                    v6_2.append("algorithm ");
                    v6_2.append(v4_2.a().a());
                    v6_2.append(" not supported");
                    throw new java.security.InvalidKeyException(v6_2.toString());
                } else {
                    return v5_1;
                }
            }
        } else {
            return new javax.crypto.spec.SecretKeySpec(v4_17, p5);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.d.engineGenerateKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.e) {
            this.d.a(new org.spongycastle.crypto.v(new java.security.SecureRandom(), this.c));
            this.e = 0;
        }
        return new javax.crypto.spec.SecretKeySpec(this.d.a(), this.a);
    }

Method org.spongycastle.jcajce.provider.asymmetric.dh.d.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(String p3)
    {
        if (this.c != null) {
            byte[] v0_4 = this.a(this.a);
            if (!p3.equals("TlsPremasterSecret")) {
                return super.engineGenerateSecret(p3);
            } else {
                return new javax.crypto.spec.SecretKeySpec(org.spongycastle.jcajce.provider.asymmetric.dh.d.a(v0_4), p3);
            }
        } else {
            throw new IllegalStateException("Diffie-Hellman not initialised.");
        }
    }

Method org.spongycastle.jcajce.provider.b.a.a.b() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private java.security.Key b(java.io.DataInputStream p5)
    {
        java.io.IOException v5_16;
        String v0_0 = p5.read();
        String v1_0 = p5.readUTF();
        String v2_1 = p5.readUTF();
        byte[] v3_1 = new byte[p5.readInt()];
        p5.readFully(v3_1);
        if ((!v1_0.equals("PKCS#8")) && (!v1_0.equals("PKCS8"))) {
            if ((!v1_0.equals("X.509")) && (!v1_0.equals("X509"))) {
                if (!v1_0.equals("RAW")) {
                    String v0_2 = new StringBuilder();
                    v0_2.append("Key format ");
                    v0_2.append(v1_0);
                    v0_2.append(" not recognised!");
                    throw new java.io.IOException(v0_2.toString());
                } else {
                    return new javax.crypto.spec.SecretKeySpec(v3_1, v2_1);
                }
            } else {
                v5_16 = new java.security.spec.X509EncodedKeySpec(v3_1);
            }
        } else {
            v5_16 = new java.security.spec.PKCS8EncodedKeySpec(v3_1);
        }
        try {
            switch (v0_0) {
                case 0:
                    return this.r.g(v2_1).generatePrivate(v5_16);
                case 1:
                    return this.r.g(v2_1).generatePublic(v5_16);
                case 2:
                    return this.r.h(v2_1).generateSecret(v5_16);
                default:
                    String v1_3 = new StringBuilder();
                    v1_3.append("Key type ");
                    v1_3.append(v0_0);
                    v1_3.append(" not recognised!");
                    throw new java.io.IOException(v1_3.toString());
            }
        } catch (java.io.IOException v5_23) {
        }
        String v1_5 = new StringBuilder();
        v1_5.append("Exception creating key: ");
        v1_5.append(v5_23.toString());
        throw new java.io.IOException(v1_5.toString());
    }

Method org.spongycastle.jcajce.provider.symmetric.h$m.engineGenerateKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.e) {
            this.d.a(new org.spongycastle.crypto.v(new java.security.SecureRandom(), this.c));
            this.e = 0;
        }
        return new javax.crypto.spec.SecretKeySpec(this.d.a(), this.a);
    }

Method org.spongycastle.jcajce.provider.symmetric.i$j.engineGenerateKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.e) {
            this.d.a(new org.spongycastle.crypto.v(new java.security.SecureRandom(), this.c));
            this.e = 0;
        }
        if (this.f) {
            return new javax.crypto.spec.SecretKeySpec(this.d.a(), this.a);
        } else {
            javax.crypto.spec.SecretKeySpec v0_5 = this.d.a();
            System.arraycopy(v0_5, 0, v0_5, 16, 8);
            return new javax.crypto.spec.SecretKeySpec(v0_5, this.a);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.f.engineGetKeySpec() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey p5, Class p6)
    {
        if (p6 != null) {
            if (p5 != null) {
                if (!javax.crypto.spec.SecretKeySpec.isAssignableFrom(p6)) {
                    try {
                        Class[] v1 = new Class[1];
                        v1[0] = byte[];
                        java.security.spec.InvalidKeySpecException v6_1 = p6.getConstructor(v1);
                        Object[] v0_0 = new Object[1];
                        v0_0[0] = p5.getEncoded();
                        return ((java.security.spec.KeySpec) v6_1.newInstance(v0_0));
                    } catch (String v5_4) {
                        throw new java.security.spec.InvalidKeySpecException(v5_4.toString());
                    }
                } else {
                    return new javax.crypto.spec.SecretKeySpec(p5.getEncoded(), this.a);
                }
            } else {
                throw new java.security.spec.InvalidKeySpecException("key parameter is null");
            }
        } else {
            throw new java.security.spec.InvalidKeySpecException("keySpec parameter is null");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.f.engineTranslateKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineTranslateKey(javax.crypto.SecretKey p3)
    {
        if (p3 != null) {
            if (p3.getAlgorithm().equalsIgnoreCase(this.a)) {
                return new javax.crypto.spec.SecretKeySpec(p3.getEncoded(), this.a);
            } else {
                javax.crypto.spec.SecretKeySpec v0_2 = new StringBuilder();
                v0_2.append("Key not of type ");
                v0_2.append(this.a);
                v0_2.append(".");
                throw new java.security.InvalidKeyException(v0_2.toString());
            }
        } else {
            throw new java.security.InvalidKeyException("key parameter is null");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.h.engineUnwrap() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.Key engineUnwrap(byte[] p4, String p5, int p6)
    {
        try {
            java.security.InvalidKeyException v4_15;
            if (this.f != null) {
                v4_15 = this.f.b(p4, 0, p4.length);
            } else {
                v4_15 = this.engineDoFinal(p4, 0, p4.length);
            }
        } catch (java.security.InvalidKeyException v4_10) {
            throw new java.security.InvalidKeyException(v4_10.getMessage());
        } catch (java.security.InvalidKeyException v4_8) {
            throw new java.security.InvalidKeyException(v4_8.getMessage());
        } catch (java.security.InvalidKeyException v4_1) {
            throw new java.security.InvalidKeyException(v4_1.getMessage());
        }
        if (p6 != 3) {
            if ((!p5.equals("")) || (p6 != 2)) {
                try {
                    String v5_9 = this.w.g(p5);
                } catch (java.security.InvalidKeyException v4_20) {
                    java.security.spec.PKCS8EncodedKeySpec v6_10 = new StringBuilder();
                    v6_10.append("Unknown key type ");
                    v6_10.append(v4_20.getMessage());
                    throw new java.security.InvalidKeyException(v6_10.toString());
                } catch (java.security.InvalidKeyException v4_17) {
                    java.security.spec.PKCS8EncodedKeySpec v6_8 = new StringBuilder();
                    v6_8.append("Unknown key type ");
                    v6_8.append(v4_17.getMessage());
                    throw new java.security.InvalidKeyException(v6_8.toString());
                }
                if (p6 != 1) {
                    if (p6 != 2) {
                        String v5_11 = new StringBuilder();
                        v5_11.append("Unknown key type ");
                        v5_11.append(p6);
                        throw new java.security.InvalidKeyException(v5_11.toString());
                    } else {
                        return v5_9.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(v4_15));
                    }
                } else {
                    return v5_9.generatePublic(new java.security.spec.X509EncodedKeySpec(v4_15));
                }
            } else {
                try {
                    java.security.InvalidKeyException v4_23 = org.spongycastle.asn1.x.u.a(v4_15);
                    String v5_17 = org.spongycastle.jce.provider.BouncyCastleProvider.a(v4_23);
                } catch (Exception) {
                    throw new java.security.InvalidKeyException("Invalid key encoding.");
                }
                if (v5_17 == null) {
                    java.security.spec.PKCS8EncodedKeySpec v6_12 = new StringBuilder();
                    v6_12.append("algorithm ");
                    v6_12.append(v4_23.a().a());
                    v6_12.append(" not supported");
                    throw new java.security.InvalidKeyException(v6_12.toString());
                } else {
                    return v5_17;
                }
            }
        } else {
            return new javax.crypto.spec.SecretKeySpec(v4_15, p5);
        }
    }

Method org.spongycastle.jce.provider.b.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.Key a(byte[] p3, String p4, int p5)
    {
        try {
            java.security.InvalidKeyException v3_4 = this.b(p3, 0, p3.length);
        } catch (java.security.InvalidKeyException v3_1) {
            throw new java.security.InvalidKeyException(v3_1.getMessage());
        } catch (java.security.InvalidKeyException v3_12) {
            throw new java.security.InvalidKeyException(v3_12.getMessage());
        }
        if (p5 != 3) {
            try {
                String v4_4 = java.security.KeyFactory.getInstance(p4, "SC");
            } catch (java.security.InvalidKeyException v3_15) {
                java.security.spec.PKCS8EncodedKeySpec v5_10 = new StringBuilder();
                v5_10.append("Unknown key type ");
                v5_10.append(v3_15.getMessage());
                throw new java.security.InvalidKeyException(v5_10.toString());
            } catch (java.security.InvalidKeyException v3_11) {
                java.security.spec.PKCS8EncodedKeySpec v5_8 = new StringBuilder();
                v5_8.append("Unknown key type ");
                v5_8.append(v3_11.getMessage());
                throw new java.security.InvalidKeyException(v5_8.toString());
            } catch (java.security.InvalidKeyException v3_8) {
                java.security.spec.PKCS8EncodedKeySpec v5_6 = new StringBuilder();
                v5_6.append("Unknown key type ");
                v5_6.append(v3_8.getMessage());
                throw new java.security.InvalidKeyException(v5_6.toString());
            }
            if (p5 != 1) {
                if (p5 != 2) {
                    String v4_6 = new StringBuilder();
                    v4_6.append("Unknown key type ");
                    v4_6.append(p5);
                    throw new java.security.InvalidKeyException(v4_6.toString());
                } else {
                    return v4_4.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(v3_4));
                }
            } else {
                return v4_4.generatePublic(new java.security.spec.X509EncodedKeySpec(v3_4));
            }
        } else {
            return new javax.crypto.spec.SecretKeySpec(v3_4, p4);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.h$l.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec p3)
    {
        if (!(p3 instanceof javax.crypto.spec.DESKeySpec)) {
            return super.engineGenerateSecret(p3);
        } else {
            return new javax.crypto.spec.SecretKeySpec(((javax.crypto.spec.DESKeySpec) p3).getKey(), "DES");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.h$l.engineGetKeySpec() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey p2, Class p3)
    {
        if (p3 != null) {
            if (p2 != null) {
                if (!javax.crypto.spec.SecretKeySpec.isAssignableFrom(p3)) {
                    if (!javax.crypto.spec.DESKeySpec.isAssignableFrom(p3)) {
                        throw new java.security.spec.InvalidKeySpecException("Invalid KeySpec");
                    } else {
                        try {
                            return new javax.crypto.spec.DESKeySpec(p2.getEncoded());
                        } catch (String v2_4) {
                            throw new java.security.spec.InvalidKeySpecException(v2_4.toString());
                        }
                    }
                } else {
                    return new javax.crypto.spec.SecretKeySpec(p2.getEncoded(), this.a);
                }
            } else {
                throw new java.security.spec.InvalidKeySpecException("key parameter is null");
            }
        } else {
            throw new java.security.spec.InvalidKeySpecException("keySpec parameter is null");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.i$i.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec p3)
    {
        if (!(p3 instanceof javax.crypto.spec.DESedeKeySpec)) {
            return super.engineGenerateSecret(p3);
        } else {
            return new javax.crypto.spec.SecretKeySpec(((javax.crypto.spec.DESedeKeySpec) p3).getKey(), "DESede");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.i$i.engineGetKeySpec() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey p4, Class p5)
    {
        if (p5 != null) {
            if (p4 != null) {
                if (!javax.crypto.spec.SecretKeySpec.isAssignableFrom(p5)) {
                    if (!javax.crypto.spec.DESedeKeySpec.isAssignableFrom(p5)) {
                        throw new java.security.spec.InvalidKeySpecException("Invalid KeySpec");
                    } else {
                        javax.crypto.spec.DESedeKeySpec v4_3 = p4.getEncoded();
                        try {
                            if (v4_3.length != 16) {
                                return new javax.crypto.spec.DESedeKeySpec(v4_3);
                            } else {
                                javax.crypto.spec.DESedeKeySpec v5_6 = new byte[24];
                                System.arraycopy(v4_3, 0, v5_6, 0, 16);
                                System.arraycopy(v4_3, 0, v5_6, 16, 8);
                                return new javax.crypto.spec.DESedeKeySpec(v5_6);
                            }
                        } catch (javax.crypto.spec.DESedeKeySpec v4_6) {
                            throw new java.security.spec.InvalidKeySpecException(v4_6.toString());
                        }
                    }
                } else {
                    return new javax.crypto.spec.SecretKeySpec(p4.getEncoded(), this.a);
                }
            } else {
                throw new java.security.spec.InvalidKeySpecException("key parameter is null");
            }
        } else {
            throw new java.security.spec.InvalidKeySpecException("keySpec parameter is null");
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.r$b.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec p4)
    {
        if (!(p4 instanceof javax.crypto.spec.PBEKeySpec)) {
            throw new java.security.spec.InvalidKeySpecException("Invalid KeySpec");
        } else {
            if (((javax.crypto.spec.PBEKeySpec) p4).getSalt() != null) {
                if (((javax.crypto.spec.PBEKeySpec) p4).getIterationCount() > 0) {
                    if (((javax.crypto.spec.PBEKeySpec) p4).getKeyLength() > 0) {
                        if (((javax.crypto.spec.PBEKeySpec) p4).getPassword().length != 0) {
                            String v0_6 = new org.spongycastle.crypto.g.ad();
                            v0_6.a(org.spongycastle.util.Strings.b(((javax.crypto.spec.PBEKeySpec) p4).getPassword()), ((javax.crypto.spec.PBEKeySpec) p4).getSalt());
                            return new javax.crypto.spec.SecretKeySpec(((org.spongycastle.crypto.l.aw) v0_6.a(((javax.crypto.spec.PBEKeySpec) p4).getKeyLength())).a(), "OpenSSLPBKDF");
                        } else {
                            throw new IllegalArgumentException("password empty");
                        }
                    } else {
                        javax.crypto.spec.SecretKeySpec v1_5 = new StringBuilder();
                        v1_5.append("positive key length required: ");
                        v1_5.append(((javax.crypto.spec.PBEKeySpec) p4).getKeyLength());
                        throw new java.security.spec.InvalidKeySpecException(v1_5.toString());
                    }
                } else {
                    javax.crypto.spec.SecretKeySpec v1_7 = new StringBuilder();
                    v1_7.append("positive iteration count required: ");
                    v1_7.append(((javax.crypto.spec.PBEKeySpec) p4).getIterationCount());
                    throw new java.security.spec.InvalidKeySpecException(v1_7.toString());
                }
            } else {
                throw new java.security.spec.InvalidKeySpecException("missing required salt");
            }
        }
    }

Method com.fitbit.data.encoders.SecureDataCoder.a() calling method javax.crypto.Cipher.doFinal()


    public byte[] a(byte[] p6)
    {
        if (p6 != 0) {
            if (this.f != null) {
                String v1_5 = new com.fitbit.data.encoders.b(p6);
                try {
                    this.e.init(1, this.f);
                    int v6_2 = this.e.doFinal(v1_5.b());
                } catch (int v6_3) {
                    Object[] v2_0 = new Object[0];
                    d.a.b.b(v6_3, "Unable to code data", v2_0);
                    v6_2 = 0;
                }
                return v6_2;
            } else {
                String v1_3 = new Object[0];
                d.a.b.b("Key not initialized", v1_3);
                return 0;
            }
        } else {
            return 0;
        }
    }

Method com.fitbit.data.encoders.SecureDataCoder.b() calling method javax.crypto.Cipher.doFinal()


    public byte[] b(byte[] p6)
    {
        if (p6 != null) {
            if (this.f != null) {
                try {
                    this.e.init(2, this.f);
                    byte[] v6_1 = this.e.doFinal(p6);
                } catch (byte[] v6_3) {
                    String v1_1 = new Object[0];
                    d.a.b.b(v6_3, "Request to decode invalid data", v1_1);
                    throw new com.fitbit.data.encoders.SecureDataCoder$InvalidDataException(v6_3);
                } catch (byte[] v6_2) {
                    Object[] v3_0 = new Object[0];
                    d.a.b.b(v6_2, "Unable to decode data", v3_0);
                    v6_1 = 0;
                }
                byte[] v6_4 = com.fitbit.data.encoders.b.a(v6_1);
                if (v6_4 != null) {
                    return v6_4.a();
                } else {
                    Object[] v0_4 = new Object[0];
                    d.a.b.b("Unable to decode data. Data is damaged", v0_4);
                    throw new com.fitbit.data.encoders.SecureDataCoder$InvalidDataException();
                }
            } else {
                String v1_3 = new Object[0];
                d.a.b.b("Key not initialized", v1_3);
                return 0;
            }
        } else {
            return 0;
        }
    }

Method org.spongycastle.jcajce.a.a.b() calling method javax.crypto.Cipher.doFinal()


    private byte[] b()
    {
        try {
            this.c = 1;
            return this.a.doFinal();
        } catch (java.security.GeneralSecurityException v0_3) {
            throw new org.spongycastle.crypto.io.InvalidCipherTextIOException("Error finalising cipher", v0_3);
        }
    }

Method org.spongycastle.jcajce.a.b.close() calling method javax.crypto.Cipher.doFinal()


    public void close()
    {
        try {
            int v0_3 = this.a.doFinal();
        } catch (int v0_2) {
            int v1_0 = new org.spongycastle.crypto.io.InvalidCipherTextIOException("Error during cipher finalisation", v0_2);
            try {
                this.flush();
                this.out.close();
            } catch (int v0_6) {
                if (v1_0 != 0) {
                } else {
                    if (v0_6 == 0) {
                        return;
                    } else {
                        throw v0_6;
                    }
                }
            }
            v0_6 = v1_0;
        } catch (int v0_7) {
            StringBuilder v2_2 = new StringBuilder();
            v2_2.append("Error closing stream: ");
            v2_2.append(v0_7);
            v1_0 = new java.io.IOException(v2_2.toString());
        }
        if (v0_3 != 0) {
            this.out.write(v0_3);
        }
        v1_0 = 0;
    }

Method org.spongycastle.jcajce.provider.b.b.a.a() calling method javax.crypto.Cipher.doFinal()


    protected byte[] a(boolean p4, org.spongycastle.asn1.x509.b p5, char[] p6, boolean p7, byte[] p8)
    {
        String v4_6;
        org.spongycastle.asn1.p v0 = p5.a();
        if (p4 == null) {
            v4_6 = 2;
        } else {
            v4_6 = 1;
        }
        if (!v0.a(org.spongycastle.asn1.x.s.bw)) {
            if (!v0.equals(org.spongycastle.asn1.x.s.y)) {
                java.io.IOException v5_2 = new StringBuilder();
                v5_2.append("unknown PBE algorithm: ");
                v5_2.append(v0);
                throw new java.io.IOException(v5_2.toString());
            } else {
                try {
                    return this.a(v4_6, p6, p5).doFinal(p8);
                } catch (String v4_5) {
                    StringBuilder v6_3 = new StringBuilder();
                    v6_3.append("exception decrypting data - ");
                    v6_3.append(v4_5.toString());
                    throw new java.io.IOException(v6_3.toString());
                }
            }
        } else {
            java.io.IOException v5_7 = org.spongycastle.asn1.x.r.a(p5.b());
            new javax.crypto.spec.PBEKeySpec(p6);
            try {
                javax.crypto.spec.PBEParameterSpec v1_3 = new javax.crypto.spec.PBEParameterSpec(v5_7.b(), v5_7.a().intValue());
                java.io.IOException v5_11 = new org.spongycastle.jcajce.PKCS12Key(p6, p7);
                StringBuilder v6_5 = this.bR.a(v0.b());
                v6_5.init(v4_6, v5_11, v1_3);
                return v6_5.doFinal(p8);
            } catch (String v4_10) {
                StringBuilder v6_7 = new StringBuilder();
                v6_7.append("exception decrypting data - ");
                v6_7.append(v4_10.toString());
                throw new java.io.IOException(v6_7.toString());
            }
        }
    }

Method com.fitbit.coin.kit.internal.device.cw.a() calling method javax.crypto.Cipher.getInstance()


    static final synthetic byte[] a(byte[] p4, java.security.PublicKey p5)
    {
        byte[] v0_2 = new byte[(p4.length + 1)];
        v0_2[0] = 10;
        System.arraycopy(p4, 0, v0_2, 1, p4.length);
        byte[] v4_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v4_1.init(1, p5);
        return v4_1.doFinal(v0_2);
    }

Method com.fitbit.coin.kit.internal.ui.fingerprint.a.a() calling method javax.crypto.Cipher.getInstance()


    private byte[] a(byte[] p4)
    {
        javax.crypto.Cipher v1_2;
        java.io.ByteArrayOutputStream v0_1 = java.security.KeyStore.getInstance("AndroidKeyStore");
        v0_1.load(0);
        java.io.ByteArrayOutputStream v0_7 = ((java.security.KeyStore$PrivateKeyEntry) v0_1.getEntry("fitbit_pay_pin", 0));
        if (!this.d()) {
            v1_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        } else {
            v1_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding", "AndroidOpenSSL");
        }
        v1_2.init(1, v0_7.getCertificate().getPublicKey());
        java.io.ByteArrayOutputStream v0_5 = new java.io.ByteArrayOutputStream();
        javax.crypto.CipherOutputStream v2_3 = new javax.crypto.CipherOutputStream(v0_5, v1_2);
        v2_3.write(p4);
        v2_3.close();
        return v0_5.toByteArray();
    }

Method com.fitbit.coin.kit.internal.ui.fingerprint.a.b() calling method javax.crypto.Cipher.getInstance()


    static final synthetic javax.crypto.Cipher b(javax.crypto.SecretKey p2)
    {
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/ECB/PKCS7Padding", "BC");
        v0_1.init(1, p2);
        return v0_1;
    }

Method com.fitbit.coin.kit.internal.ui.fingerprint.a.b() calling method javax.crypto.Cipher.getInstance()


    private byte[] b(byte[] p4)
    {
        int v1_2;
        byte[] v0_1 = java.security.KeyStore.getInstance("AndroidKeyStore");
        v0_1.load(0);
        byte[] v0_8 = ((java.security.KeyStore$PrivateKeyEntry) v0_1.getEntry("fitbit_pay_pin", 0));
        if (!this.d()) {
            v1_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        } else {
            v1_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding", "AndroidOpenSSL");
        }
        v1_2.init(2, v0_8.getPrivateKey());
        byte[] v0_4 = new javax.crypto.CipherInputStream(new java.io.ByteArrayInputStream(p4), v1_2);
        java.util.ArrayList v4_2 = new java.util.ArrayList();
        while(true) {
            int v1_5 = v0_4.read();
            if (v1_5 == -1) {
                break;
            }
            v4_2.add(Byte.valueOf(((byte) v1_5)));
        }
        byte[] v0_6 = new byte[v4_2.size()];
        int v1_6 = 0;
        while (v1_6 < v0_6.length) {
            v0_6[v1_6] = ((Byte) v4_2.get(v1_6)).byteValue();
            v1_6++;
        }
        return v0_6;
    }

Method com.fitbit.data.encoders.SecureDataCoder.a() calling method javax.crypto.Cipher.getInstance()


    public boolean a(android.content.Context p4)
    {
        if (p4 != 0) {
            this.g = p4.getApplicationContext();
            try {
                this.d = java.security.MessageDigest.getInstance(ark>com.fitbit.data.encoders.SecureDataCoderark>.b);
                this.e = javax.crypto.Cipher.getInstance(ark>com.fitbit.data.encoders.SecureDataCoderark>.a);
                javax.crypto.spec.SecretKeySpec v1_2 = new StringBuilder();
                v1_2.append(this.a());
                v1_2.append(this.b(p4));
                int v4_4 = this.c(v1_2.toString().getBytes());
            } catch (int v4_5) {
                String v2_1 = new Object[0];
                d.a.b.b(v4_5, "Unable to init cipher", v2_1);
                return 0;
            }
            if (v4_4 != 0) {
                this.f = new javax.crypto.spec.SecretKeySpec(v4_4, ark>com.fitbit.data.encoders.SecureDataCoderark>.a);
                Object[] v0_1 = new Object[0];
                d.a.b.b("Key successfully initialized", v0_1);
                return 1;
            } else {
                javax.crypto.spec.SecretKeySpec v1_7 = new Object[0];
                d.a.b.b("Unable to init key. Hash is null", v1_7);
                return 0;
            }
        } else {
            javax.crypto.spec.SecretKeySpec v1_8 = new Object[0];
            d.a.b.b("Request to init with null context", v1_8);
            return 0;
        }
    }

Method org.spongycastle.jcajce.b.c.a() calling method javax.crypto.Cipher.getInstance()


    public javax.crypto.Cipher a(String p1)
    {
        return javax.crypto.Cipher.getInstance(p1);
    }

Method org.spongycastle.jcajce.b.g.a() calling method javax.crypto.Cipher.getInstance()


    public javax.crypto.Cipher a(String p2)
    {
        return javax.crypto.Cipher.getInstance(p2, this.a);
    }

Method org.spongycastle.jcajce.b.h.a() calling method javax.crypto.Cipher.getInstance()


    public javax.crypto.Cipher a(String p2)
    {
        return javax.crypto.Cipher.getInstance(p2, this.a);
    }

Method org.spongycastle.jcajce.provider.b.b.a.a() calling method javax.crypto.Cipher.getInstance()


    private javax.crypto.Cipher a(int p11, char[] p12, org.spongycastle.asn1.x509.b p13)
    {
        javax.crypto.SecretKey v12_1;
        byte[] v13_2 = org.spongycastle.asn1.x.p.a(p13.b());
        javax.crypto.Cipher v0_8 = org.spongycastle.asn1.x.q.a(v13_2.a().b());
        org.spongycastle.jcajce.spec.a v1_1 = org.spongycastle.asn1.x509.b.a(v13_2.b());
        org.spongycastle.asn1.p v2_1 = this.bR.h(v13_2.a().a().b());
        if (!v0_8.d()) {
            org.spongycastle.jcajce.spec.d v9 = new org.spongycastle.jcajce.spec.d;
            v9(p12, v0_8.a(), v0_8.b().intValue(), ark>org.spongycastle.jcajce.provider.b.b.aark>.bU.a(v1_1), v0_8.e());
            v12_1 = v2_1.generateSecret(v9);
        } else {
            v12_1 = v2_1.generateSecret(new javax.crypto.spec.PBEKeySpec(p12, v0_8.a(), v0_8.b().intValue(), ark>org.spongycastle.jcajce.provider.b.b.aark>.bU.a(v1_1)));
        }
        javax.crypto.Cipher v0_6 = javax.crypto.Cipher.getInstance(v13_2.b().a().b());
        org.spongycastle.asn1.x509.b.a(v13_2.b());
        byte[] v13_4 = v13_2.b().b();
        if (!(v13_4 instanceof org.spongycastle.asn1.q)) {
            byte[] v13_5 = org.spongycastle.asn1.g.d.a(v13_4);
            v0_6.init(p11, v12_1, new org.spongycastle.jcajce.spec.a(v13_5.a(), v13_5.b()));
        } else {
            v0_6.init(p11, v12_1, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.q.a(v13_4).d()));
        }
        return v0_6;
    }

Method org.spongycastle.jcajce.b.c.f() calling method javax.crypto.KeyGenerator.getInstance()


    public javax.crypto.KeyGenerator f(String p1)
    {
        return javax.crypto.KeyGenerator.getInstance(p1);
    }

Method org.spongycastle.jcajce.b.g.f() calling method javax.crypto.KeyGenerator.getInstance()


    public javax.crypto.KeyGenerator f(String p2)
    {
        return javax.crypto.KeyGenerator.getInstance(p2, this.a);
    }

Method org.spongycastle.jcajce.b.h.f() calling method javax.crypto.KeyGenerator.getInstance()


    public javax.crypto.KeyGenerator f(String p2)
    {
        return javax.crypto.KeyGenerator.getInstance(p2, this.a);
    }

Method org.spongycastle.jcajce.provider.b.a.a.a() calling method java.security.Key.getAlgorithm()


    private void a(java.security.Key p3, java.io.DataOutputStream p4)
    {
        byte[] v0 = p3.getEncoded();
        if (!(p3 instanceof java.security.PrivateKey)) {
            if (!(p3 instanceof java.security.PublicKey)) {
                p4.write(2);
            } else {
                p4.write(1);
            }
        } else {
            p4.write(0);
        }
        p4.writeUTF(p3.getFormat());
        p4.writeUTF(p3.getAlgorithm());
        p4.writeInt(v0.length);
        p4.write(v0);
        return;
    }

Method org.spongycastle.jcajce.provider.symmetric.util.c.engineInit() calling method java.security.Key.getAlgorithm()


    protected void engineInit(int p19, java.security.Key p20, java.security.spec.AlgorithmParameterSpec p21, java.security.SecureRandom p22)
    {
        org.spongycastle.crypto.j v6_0 = 0;
        this.G = 0;
        this.H = 0;
        this.e = 0;
        this.z = 0;
        if ((p20 instanceof javax.crypto.SecretKey)) {
            if ((p21 != null) || (!this.v.b().startsWith("RC5-64"))) {
                if ((this.B != 2) && (!(p20 instanceof org.spongycastle.jcajce.PKCS12Key))) {
                    if (!(p20 instanceof org.spongycastle.jcajce.PBKDF1Key)) {
                        if (!(p20 instanceof org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey)) {
                            if (!(p20 instanceof javax.crypto.interfaces.PBEKey)) {
                                if (!(p20 instanceof org.spongycastle.jcajce.spec.RepeatedSecretKeySpec)) {
                                    if ((this.B != 0) && ((this.B != 4) && ((this.B != 1) && (this.B != 5)))) {
                                        v6_0 = new org.spongycastle.crypto.l.aw(p20.getEncoded());
                                    } else {
                                        throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                                    }
                                }
                            } else {
                                this.G = ((javax.crypto.spec.PBEParameterSpec) p21);
                                if (((((javax.crypto.interfaces.PBEKey) p20) instanceof org.spongycastle.jcajce.PKCS12KeyWithParameters)) && (this.G == null)) {
                                    this.G = new javax.crypto.spec.PBEParameterSpec(((javax.crypto.interfaces.PBEKey) p20).getSalt(), ((javax.crypto.interfaces.PBEKey) p20).getIterationCount());
                                }
                                v6_0 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((javax.crypto.interfaces.PBEKey) p20).getEncoded(), this.B, this.C, this.A, (this.D * 8), this.G, this.x.a());
                                if ((v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                    this.y = ((org.spongycastle.crypto.l.bd) v6_0);
                                }
                            }
                        } else {
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).f() == null) {
                                this.H = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).getAlgorithm();
                            } else {
                                this.H = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).f().b();
                            }
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).e() == null) {
                                if (!(p21 instanceof javax.crypto.spec.PBEParameterSpec)) {
                                    throw new java.security.InvalidAlgorithmParameterException("PBE requires PBE parameters to be set.");
                                } else {
                                    this.G = ((javax.crypto.spec.PBEParameterSpec) p21);
                                    v6_0 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20), p21, this.x.c().b());
                                }
                            } else {
                                v6_0 = this.a(p21, ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).e());
                            }
                            if ((v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                this.y = ((org.spongycastle.crypto.l.bd) v6_0);
                            }
                        }
                    } else {
                        if ((p21 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            this.G = ((javax.crypto.spec.PBEParameterSpec) p21);
                        }
                        if (((((org.spongycastle.jcajce.PBKDF1Key) p20) instanceof org.spongycastle.jcajce.PBKDF1KeyWithParameters)) && (this.G == null)) {
                            this.G = new javax.crypto.spec.PBEParameterSpec(((org.spongycastle.jcajce.PBKDF1KeyWithParameters) ((org.spongycastle.jcajce.PBKDF1Key) p20)).getSalt(), ((org.spongycastle.jcajce.PBKDF1KeyWithParameters) ((org.spongycastle.jcajce.PBKDF1Key) p20)).getIterationCount());
                        }
                        v6_0 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((org.spongycastle.jcajce.PBKDF1Key) p20).getEncoded(), 0, this.C, this.A, (this.D * 8), this.G, this.x.a());
                        if ((v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                            this.y = ((org.spongycastle.crypto.l.bd) v6_0);
                        }
                    }
                } else {
                    try {
                        if ((p21 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            this.G = ((javax.crypto.spec.PBEParameterSpec) p21);
                        }
                    } catch (Exception) {
                        throw new java.security.InvalidKeyException("PKCS12 requires a SecretKey/PBEKey");
                    }
                    reflect.Method v7_27 = (((javax.crypto.SecretKey) p20) instanceof javax.crypto.interfaces.PBEKey);
                    if ((v7_27 != null) && (this.G == null)) {
                        this.G = new javax.crypto.spec.PBEParameterSpec(((javax.crypto.interfaces.PBEKey) ((javax.crypto.SecretKey) p20)).getSalt(), ((javax.crypto.interfaces.PBEKey) ((javax.crypto.SecretKey) p20)).getIterationCount());
                    }
                    if ((this.G != null) || (v7_27 != null)) {
                        if (!(p20 instanceof org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey)) {
                            v6_0 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((javax.crypto.SecretKey) p20).getEncoded(), 2, this.C, this.A, (this.D * 8), this.G, this.x.a());
                        } else {
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).e() == null) {
                                v6_0 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((javax.crypto.SecretKey) p20).getEncoded(), 2, this.C, this.A, (this.D * 8), this.G, this.x.a());
                            } else {
                                v6_0 = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p20).e();
                            }
                        }
                        if ((v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                            this.y = ((org.spongycastle.crypto.l.bd) v6_0);
                        }
                    } else {
                        throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                    }
                }
                if (!(p21 instanceof javax.crypto.spec.IvParameterSpec)) {
                    String v3_39;
                    if (!(p21 instanceof org.spongycastle.jcajce.spec.a)) {
                        if (!(p21 instanceof javax.crypto.spec.RC2ParameterSpec)) {
                            if (!(p21 instanceof javax.crypto.spec.RC5ParameterSpec)) {
                                if ((org.spongycastle.jcajce.provider.symmetric.util.c.t == null) || (!org.spongycastle.jcajce.provider.symmetric.util.c.t.isInstance(p21))) {
                                    if ((p21 == null) || ((p21 instanceof javax.crypto.spec.PBEParameterSpec))) {
                                        if ((this.D == 0) || (((v6_0 instanceof org.spongycastle.crypto.l.bd)) || ((v6_0 instanceof org.spongycastle.crypto.l.a)))) {
                                            String v3_78 = v6_0;
                                        } else {
                                            String v3_72;
                                            if (p22 != null) {
                                                v3_72 = p22;
                                            } else {
                                                v3_72 = new java.security.SecureRandom();
                                            }
                                            if ((p19 != 1) && (p19 != 3)) {
                                                if (this.x.c().b().indexOf("PGPCFB") >= 0) {
                                                } else {
                                                    throw new java.security.InvalidAlgorithmParameterException("no IV set when one expected");
                                                }
                                            } else {
                                                org.spongycastle.crypto.l.bd v4_35 = new byte[this.D];
                                                v3_72.nextBytes(v4_35);
                                                v3_78 = new org.spongycastle.crypto.l.bd(v6_0, v4_35);
                                                this.y = ((org.spongycastle.crypto.l.bd) v3_78);
                                            }
                                        }
                                        if ((p22 != null) && (this.E)) {
                                            v3_78 = new org.spongycastle.crypto.l.be(v3_78, p22);
                                        }
                                        try {
                                            switch (p19) {
                                                case 1:
                                                case 3:
                                                    this.x.a(1, v3_78);
                                                    return;
                                                case 2:
                                                case 4:
                                                    this.x.a(0, v3_78);
                                                    return;
                                                default:
                                                    org.spongycastle.crypto.l.bd v4_42 = new StringBuilder();
                                                    v4_42.append("unknown opmode ");
                                                    v4_42.append(p19);
                                                    v4_42.append(" passed");
                                                    throw new java.security.InvalidParameterException(v4_42.toString());
                                            }
                                        } catch (Exception v0) {
                                        }
                                        java.security.InvalidAlgorithmParameterException v2_27 = v0;
                                        throw new org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher$1(this, v2_27.getMessage(), v2_27);
                                    } else {
                                        throw new java.security.InvalidAlgorithmParameterException("unknown parameter type.");
                                    }
                                } else {
                                    if ((this.d(this.I)) || ((this.x instanceof org.spongycastle.jcajce.provider.symmetric.util.c$a))) {
                                        try {
                                            org.spongycastle.crypto.j v6_12;
                                            org.spongycastle.crypto.l.a v10_6 = new Class[0];
                                            String v3_13 = org.spongycastle.jcajce.provider.symmetric.util.c.t.getDeclaredMethod("getTLen", v10_6);
                                            Object[] v11_4 = new Class[0];
                                            reflect.Method v7_44 = org.spongycastle.jcajce.provider.symmetric.util.c.t.getDeclaredMethod("getIV", v11_4);
                                        } catch (Exception) {
                                            throw new java.security.InvalidAlgorithmParameterException("Cannot process GCMParameterSpec.");
                                        }
                                        if (!(v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                            v6_12 = ((org.spongycastle.crypto.l.aw) v6_0);
                                        } else {
                                            v6_12 = ((org.spongycastle.crypto.l.aw) ((org.spongycastle.crypto.l.bd) v6_0).b());
                                        }
                                        Object[] v11_5 = new Object[0];
                                        Object[] v11_6 = new Object[0];
                                        org.spongycastle.crypto.l.a v10_10 = new org.spongycastle.crypto.l.a(v6_12, ((Integer) v3_13.invoke(p21, v11_5)).intValue(), ((byte[]) v7_44.invoke(p21, v11_6)));
                                        this.z = v10_10;
                                        v6_0 = v10_10;
                                    } else {
                                        throw new java.security.InvalidAlgorithmParameterException("GCMParameterSpec can only be used with AEAD modes.");
                                    }
                                }
                            } else {
                                v6_0 = new org.spongycastle.crypto.l.bi(p20.getEncoded(), ((javax.crypto.spec.RC5ParameterSpec) p21).getRounds());
                                if (!this.v.b().startsWith("RC5")) {
                                    throw new java.security.InvalidAlgorithmParameterException("RC5 parameters passed to a cipher that is not RC5.");
                                } else {
                                    if (!this.v.b().equals("RC5-32")) {
                                        if ((this.v.b().equals("RC5-64")) && (((javax.crypto.spec.RC5ParameterSpec) p21).getWordSize() != 64)) {
                                            String v3_32 = new StringBuilder();
                                            v3_32.append("RC5 already set up for a word size of 64 not ");
                                            v3_32.append(((javax.crypto.spec.RC5ParameterSpec) p21).getWordSize());
                                            v3_32.append(".");
                                            throw new java.security.InvalidAlgorithmParameterException(v3_32.toString());
                                        }
                                    } else {
                                        if (((javax.crypto.spec.RC5ParameterSpec) p21).getWordSize() != 32) {
                                            String v3_42 = new StringBuilder();
                                            v3_42.append("RC5 already set up for a word size of 32 not ");
                                            v3_42.append(((javax.crypto.spec.RC5ParameterSpec) p21).getWordSize());
                                            v3_42.append(".");
                                            throw new java.security.InvalidAlgorithmParameterException(v3_42.toString());
                                        }
                                    }
                                    if ((((javax.crypto.spec.RC5ParameterSpec) p21).getIV() == null) || (this.D == 0)) {
                                    } else {
                                        if (!(v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                            v3_39 = new org.spongycastle.crypto.l.bd(v6_0, ((javax.crypto.spec.RC5ParameterSpec) p21).getIV());
                                        } else {
                                            v3_39 = new org.spongycastle.crypto.l.bd(((org.spongycastle.crypto.l.bd) v6_0).b(), ((javax.crypto.spec.RC5ParameterSpec) p21).getIV());
                                        }
                                        this.y = ((org.spongycastle.crypto.l.bd) v3_39);
                                    }
                                }
                            }
                        } else {
                            v6_0 = new org.spongycastle.crypto.l.bh(p20.getEncoded(), ((javax.crypto.spec.RC2ParameterSpec) p21).getEffectiveKeyBits());
                            if ((((javax.crypto.spec.RC2ParameterSpec) p21).getIV() == null) || (this.D == 0)) {
                            } else {
                                if (!(v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                    v3_39 = new org.spongycastle.crypto.l.bd(v6_0, ((javax.crypto.spec.RC2ParameterSpec) p21).getIV());
                                } else {
                                    v3_39 = new org.spongycastle.crypto.l.bd(((org.spongycastle.crypto.l.bd) v6_0).b(), ((javax.crypto.spec.RC2ParameterSpec) p21).getIV());
                                }
                                this.y = ((org.spongycastle.crypto.l.bd) v3_39);
                            }
                        }
                    } else {
                        v6_0 = new org.spongycastle.crypto.l.bf(new org.spongycastle.crypto.l.aw(p20.getEncoded()), ((org.spongycastle.jcajce.spec.a) p21).a());
                        if ((((org.spongycastle.jcajce.spec.a) p21).b() == null) || (this.D == 0)) {
                        } else {
                            if (!(v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                v3_39 = new org.spongycastle.crypto.l.bd(v6_0, ((org.spongycastle.jcajce.spec.a) p21).b());
                            } else {
                                v3_39 = new org.spongycastle.crypto.l.bd(((org.spongycastle.crypto.l.bd) v6_0).b(), ((org.spongycastle.jcajce.spec.a) p21).b());
                            }
                            this.y = ((org.spongycastle.crypto.l.bd) v3_39);
                        }
                    }
                    v6_0 = v3_39;
                } else {
                    if (this.D == 0) {
                        if ((this.I != null) && (this.I.equals("ECB"))) {
                            throw new java.security.InvalidAlgorithmParameterException("ECB mode does not use an IV");
                        }
                    } else {
                        if ((((javax.crypto.spec.IvParameterSpec) p21).getIV().length == this.D) || (((this.x instanceof org.spongycastle.jcajce.provider.symmetric.util.c$a)) || (!this.F))) {
                            org.spongycastle.crypto.l.bd v4_30;
                            if (!(v6_0 instanceof org.spongycastle.crypto.l.bd)) {
                                v4_30 = new org.spongycastle.crypto.l.bd(v6_0, ((javax.crypto.spec.IvParameterSpec) p21).getIV());
                            } else {
                                v4_30 = new org.spongycastle.crypto.l.bd(((org.spongycastle.crypto.l.bd) v6_0).b(), ((javax.crypto.spec.IvParameterSpec) p21).getIV());
                            }
                            v6_0 = v4_30;
                            this.y = ((org.spongycastle.crypto.l.bd) v6_0);
                        } else {
                            String v3_86 = new StringBuilder();
                            v3_86.append("IV must be ");
                            v3_86.append(this.D);
                            v3_86.append(" bytes long.");
                            throw new java.security.InvalidAlgorithmParameterException(v3_86.toString());
                        }
                    }
                }
            } else {
                throw new java.security.InvalidAlgorithmParameterException("RC5 requires an RC5ParametersSpec to be passed in.");
            }
        } else {
            org.spongycastle.crypto.l.bd v4_48 = new StringBuilder();
            v4_48.append("Key for algorithm ");
            v4_48.append(p20.getAlgorithm());
            v4_48.append(" not suitable for symmetric enryption.");
            throw new java.security.InvalidKeyException(v4_48.toString());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.g.engineInit() calling method java.security.Key.getAlgorithm()


    protected void engineInit(int p10, java.security.Key p11, java.security.spec.AlgorithmParameterSpec p12, java.security.SecureRandom p13)
    {
        this.z = 0;
        this.A = 0;
        this.e = 0;
        if ((p11 instanceof javax.crypto.SecretKey)) {
            org.spongycastle.crypto.l.bd v12_1;
            if (!(p11 instanceof org.spongycastle.jcajce.PKCS12Key)) {
                if (!(p11 instanceof org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey)) {
                    if (p12 != null) {
                        if (!(p12 instanceof javax.crypto.spec.IvParameterSpec)) {
                            throw new java.security.InvalidAlgorithmParameterException("unknown parameter type.");
                        } else {
                            org.spongycastle.crypto.j v0_4 = new org.spongycastle.crypto.l.bd(new org.spongycastle.crypto.l.aw(p11.getEncoded()), ((javax.crypto.spec.IvParameterSpec) p12).getIV());
                            this.x = ((org.spongycastle.crypto.l.bd) v0_4);
                            v12_1 = v0_4;
                        }
                    } else {
                        if (this.w <= 0) {
                            v12_1 = new org.spongycastle.crypto.l.aw(p11.getEncoded());
                        } else {
                            throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                        }
                    }
                } else {
                    if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).f() == null) {
                        this.A = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getAlgorithm();
                    } else {
                        this.A = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).f().b();
                    }
                    if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).e() == null) {
                        if (!(p12 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            throw new java.security.InvalidAlgorithmParameterException("PBE requires PBE parameters to be set.");
                        } else {
                            org.spongycastle.crypto.j v0_15 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11), p12, this.u.b());
                            this.z = ((javax.crypto.spec.PBEParameterSpec) p12);
                            v12_1 = v0_15;
                        }
                    } else {
                        v12_1 = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).e();
                        this.z = new javax.crypto.spec.PBEParameterSpec(((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getSalt(), ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getIterationCount());
                    }
                    if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).d() != 0) {
                        this.x = ((org.spongycastle.crypto.l.bd) v12_1);
                    }
                }
            } else {
                this.z = ((javax.crypto.spec.PBEParameterSpec) p12);
                if (((((org.spongycastle.jcajce.PKCS12Key) p11) instanceof org.spongycastle.jcajce.PKCS12KeyWithParameters)) && (this.z == null)) {
                    this.z = new javax.crypto.spec.PBEParameterSpec(((org.spongycastle.jcajce.PKCS12KeyWithParameters) ((org.spongycastle.jcajce.PKCS12Key) p11)).getSalt(), ((org.spongycastle.jcajce.PKCS12KeyWithParameters) ((org.spongycastle.jcajce.PKCS12Key) p11)).getIterationCount());
                }
                v12_1 = org.spongycastle.jcajce.provider.symmetric.util.k$a.a(((org.spongycastle.jcajce.PKCS12Key) p11).getEncoded(), 2, this.w, this.v, (this.y * 8), this.z, this.u.b());
            }
            if ((this.y != 0) && (!(v12_1 instanceof org.spongycastle.crypto.l.bd))) {
                if (p13 == null) {
                    p13 = new java.security.SecureRandom();
                }
                if ((p10 != 1) && (p10 != 3)) {
                    throw new java.security.InvalidAlgorithmParameterException("no IV set when one expected");
                } else {
                    String v11_9 = new byte[this.y];
                    p13.nextBytes(v11_9);
                    org.spongycastle.crypto.l.bd v13_3 = new org.spongycastle.crypto.l.bd(v12_1, v11_9);
                    this.x = ((org.spongycastle.crypto.l.bd) v13_3);
                    v12_1 = v13_3;
                }
            }
            try {
                switch (p10) {
                    case 1:
                    case 3:
                        this.u.a(1, v12_1);
                        return;
                    case 2:
                    case 4:
                        this.u.a(0, v12_1);
                        return;
                    default:
                        org.spongycastle.crypto.l.bd v12_3 = new StringBuilder();
                        v12_3.append("unknown opmode ");
                        v12_3.append(p10);
                        v12_3.append(" passed");
                        throw new java.security.InvalidParameterException(v12_3.toString());
                }
            } catch (java.security.InvalidAlgorithmParameterException v10_9) {
            }
            throw new java.security.InvalidKeyException(v10_9.getMessage());
        } else {
            org.spongycastle.crypto.l.bd v12_5 = new StringBuilder();
            v12_5.append("Key for algorithm ");
            v12_5.append(p11.getAlgorithm());
            v12_5.append(" not suitable for symmetric enryption.");
            throw new java.security.InvalidKeyException(v12_5.toString());
        }
    }

Method org.spongycastle.jcajce.provider.b.b.a.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private javax.crypto.Cipher a(int p11, char[] p12, org.spongycastle.asn1.x509.b p13)
    {
        javax.crypto.SecretKey v12_1;
        byte[] v13_2 = org.spongycastle.asn1.x.p.a(p13.b());
        javax.crypto.Cipher v0_8 = org.spongycastle.asn1.x.q.a(v13_2.a().b());
        org.spongycastle.jcajce.spec.a v1_1 = org.spongycastle.asn1.x509.b.a(v13_2.b());
        org.spongycastle.asn1.p v2_1 = this.bR.h(v13_2.a().a().b());
        if (!v0_8.d()) {
            org.spongycastle.jcajce.spec.d v9 = new org.spongycastle.jcajce.spec.d;
            v9(p12, v0_8.a(), v0_8.b().intValue(), ark>org.spongycastle.jcajce.provider.b.b.aark>.bU.a(v1_1), v0_8.e());
            v12_1 = v2_1.generateSecret(v9);
        } else {
            v12_1 = v2_1.generateSecret(new javax.crypto.spec.PBEKeySpec(p12, v0_8.a(), v0_8.b().intValue(), ark>org.spongycastle.jcajce.provider.b.b.aark>.bU.a(v1_1)));
        }
        javax.crypto.Cipher v0_6 = javax.crypto.Cipher.getInstance(v13_2.b().a().b());
        org.spongycastle.asn1.x509.b.a(v13_2.b());
        byte[] v13_4 = v13_2.b().b();
        if (!(v13_4 instanceof org.spongycastle.asn1.q)) {
            byte[] v13_5 = org.spongycastle.asn1.g.d.a(v13_4);
            v0_6.init(p11, v12_1, new org.spongycastle.jcajce.spec.a(v13_5.a(), v13_5.b()));
        } else {
            v0_6.init(p11, v12_1, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.q.a(v13_4).d()));
        }
        return v0_6;
    }

Method org.spongycastle.jcajce.provider.symmetric.a$c.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("AES");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.a$g.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p4)
    {
        if ((p4 != java.security.spec.AlgorithmParameterSpec) && (!org.spongycastle.jcajce.provider.symmetric.k.a(p4))) {
            if (p4 != javax.crypto.spec.IvParameterSpec) {
                StringBuilder v1_1 = new StringBuilder();
                v1_1.append("AlgorithmParameterSpec not recognized: ");
                v1_1.append(p4.getName());
                throw new java.security.spec.InvalidParameterSpecException(v1_1.toString());
            } else {
                return new javax.crypto.spec.IvParameterSpec(this.a.a());
            }
        } else {
            if (!org.spongycastle.jcajce.provider.symmetric.k.a()) {
                return new javax.crypto.spec.IvParameterSpec(this.a.a());
            } else {
                return org.spongycastle.jcajce.provider.symmetric.k.a(this.a.k());
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.a$h.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p4)
    {
        if ((p4 != java.security.spec.AlgorithmParameterSpec) && (!org.spongycastle.jcajce.provider.symmetric.k.a(p4))) {
            if (p4 != javax.crypto.spec.IvParameterSpec) {
                StringBuilder v1_1 = new StringBuilder();
                v1_1.append("AlgorithmParameterSpec not recognized: ");
                v1_1.append(p4.getName());
                throw new java.security.spec.InvalidParameterSpecException(v1_1.toString());
            } else {
                return new javax.crypto.spec.IvParameterSpec(this.a.a());
            }
        } else {
            if (!org.spongycastle.jcajce.provider.symmetric.k.a()) {
                return new javax.crypto.spec.IvParameterSpec(this.a.a());
            } else {
                return org.spongycastle.jcajce.provider.symmetric.k.a(this.a.k());
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.p$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("IDEA");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.ac$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[32];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("Shacal2");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.d$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("CAST5");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.d$b.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p2)
    {
        if (p2 != javax.crypto.spec.IvParameterSpec) {
            throw new java.security.spec.InvalidParameterSpecException("unknown parameter spec passed to CAST5 parameters object.");
        } else {
            return new javax.crypto.spec.IvParameterSpec(this.a);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.f$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("Camellia");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.h$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("DES");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.i$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("DES");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.j$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("GOST28147");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.p$b.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p2)
    {
        if (p2 != javax.crypto.spec.IvParameterSpec) {
            throw new java.security.spec.InvalidParameterSpecException("unknown parameter spec passed to IV parameters object.");
        } else {
            return new javax.crypto.spec.IvParameterSpec(this.a);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.q$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("Noekeon");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.u$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        RuntimeException v1_6;
        if (this.a != null) {
            try {
                v1_6 = this.a("RC2");
                v1_6.init(this.a);
            } catch (String v0_8) {
                throw new RuntimeException(v0_8.getMessage());
            }
        } else {
            String v0_3 = new byte[8];
            if (this.b == null) {
                this.b = new java.security.SecureRandom();
            }
            this.b.nextBytes(v0_3);
            try {
                v1_6 = this.a("RC2");
                v1_6.init(new javax.crypto.spec.IvParameterSpec(v0_3));
            } catch (String v0_5) {
                throw new RuntimeException(v0_5.getMessage());
            }
        }
        return v1_6;
    }

Method org.spongycastle.jcajce.provider.symmetric.u$b.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p3)
    {
        if ((p3 != javax.crypto.spec.RC2ParameterSpec) || (this.d == -1)) {
            if (p3 != javax.crypto.spec.IvParameterSpec) {
                throw new java.security.spec.InvalidParameterSpecException("unknown parameter spec passed to RC2 parameters object.");
            } else {
                return new javax.crypto.spec.IvParameterSpec(this.c);
            }
        } else {
            if (this.d >= 256) {
                return new javax.crypto.spec.RC2ParameterSpec(this.d, this.c);
            } else {
                return new javax.crypto.spec.RC2ParameterSpec(ark>org.spongycastle.jcajce.provider.symmetric.u$bark>.b[this.d], this.c);
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.util.j.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec a(Class p2)
    {
        if (p2 != javax.crypto.spec.IvParameterSpec) {
            throw new java.security.spec.InvalidParameterSpecException("unknown parameter spec passed to IV parameters object.");
        } else {
            return new javax.crypto.spec.IvParameterSpec(this.a);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.v$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("RC5");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.w$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("RC6");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.y$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("SEED");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.z$a.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.b == null) {
            this.b = new java.security.SecureRandom();
        }
        this.b.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.a("SM4");
            v1_0.init(new javax.crypto.spec.IvParameterSpec(v0_1));
            return v1_0;
        } catch (String v0_2) {
            throw new RuntimeException(v0_2.getMessage());
        }
    }