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 org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder$1.get() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public org.spongycastle.operator.InputDecryptor get(org.spongycastle.asn1.x509.AlgorithmIdentifier p12)
    {
        javax.crypto.SecretKey v0_0 = p12.getAlgorithm();
        try {
            if (!v0_0.on(org.spongycastle.asn1.pkcs.PKCSObjectIdentifiers.pkcs_12PbeIds)) {
                if (v0_0.equals(org.spongycastle.asn1.pkcs.PKCSObjectIdentifiers.id_PBES2)) {
                    javax.crypto.SecretKey v0_9;
                    byte[] v12_5 = org.spongycastle.asn1.pkcs.PBES2Parameters.getInstance(p12.getParameters());
                    javax.crypto.SecretKey v0_8 = org.spongycastle.asn1.pkcs.PBKDF2Params.getInstance(v12_5.getKeyDerivationFunc().getParameters());
                    javax.crypto.Cipher v1_10 = org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v12_5.getEncryptionScheme());
                    org.spongycastle.jcajce.spec.GOST28147ParameterSpec v3_10 = org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$000(this.this$0).createSecretKeyFactory(v12_5.getKeyDerivationFunc().getAlgorithm().getId());
                    if (!v0_8.isDefaultPrf()) {
                        org.spongycastle.jcajce.spec.PBKDF2KeySpec v10 = new org.spongycastle.jcajce.spec.PBKDF2KeySpec;
                        v10(this.val$password, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$200(this.this$0).getKeySize(v1_10), v0_8.getPrf());
                        v0_9 = v3_10.generateSecret(v10);
                    } else {
                        v0_9 = v3_10.generateSecret(new javax.crypto.spec.PBEKeySpec(this.val$password, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$200(this.this$0).getKeySize(v1_10)));
                    }
                    this.cipher = org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$000(this.this$0).createCipher(v12_5.getEncryptionScheme().getAlgorithm().getId());
                    this.encryptionAlg = org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v12_5.getEncryptionScheme());
                    byte[] v12_10 = v12_5.getEncryptionScheme().getParameters();
                    if (!(v12_10 instanceof org.spongycastle.asn1.ASN1OctetString)) {
                        byte[] v12_11 = org.spongycastle.asn1.cryptopro.GOST28147Parameters.getInstance(v12_10);
                        this.cipher.init(2, v0_9, new org.spongycastle.jcajce.spec.GOST28147ParameterSpec(v12_11.getEncryptionParamSet(), v12_11.getIV()));
                    } else {
                        this.cipher.init(2, v0_9, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(v12_10).getOctets()));
                    }
                }
            } else {
                javax.crypto.Cipher v1_2 = org.spongycastle.asn1.pkcs.PKCS12PBEParams.getInstance(p12.getParameters());
                this.cipher = org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$000(this.this$0).createCipher(v0_0.getId());
                this.cipher.init(2, new org.spongycastle.jcajce.PKCS12KeyWithParameters(this.val$password, org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder.access$100(this.this$0), v1_2.getIV(), v1_2.getIterations().intValue()));
                this.encryptionAlg = p12;
            }
        } catch (byte[] v12_6) {
            javax.crypto.Cipher v1_6 = new StringBuilder();
            v1_6.append("unable to create InputDecryptor: ");
            v1_6.append(v12_6.getMessage());
            throw new org.spongycastle.operator.OperatorCreationException(v1_6.toString(), v12_6);
        }
        return new org.spongycastle.pkcs.jcajce.JcePKCSPBEInputDecryptorProviderBuilder$1$1(this);
    }

Method org.jscep.message.f$a.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private java.security.spec.AlgorithmParameterSpec a(org.spongycastle.asn1.x509.AlgorithmIdentifier p2)
    {
        return new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(p2.getParameters()).getOctets());
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator.encryptSessionInfo() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected byte[] encryptSessionInfo(int p4, byte[] p5, byte[] p6)
    {
        try {
            String v0_0 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
            javax.crypto.spec.SecretKeySpec v1_2 = this.helper;
            byte[] v2_3 = new StringBuilder();
            v2_3.append(v0_0);
            v2_3.append("/CFB/NoPadding");
            String v0_1 = v1_2.createCipher(v2_3.toString());
            byte[] v2_1 = new byte[v0_1.getBlockSize()];
            v0_1.init(1, new javax.crypto.spec.SecretKeySpec(p5, org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4)), new javax.crypto.spec.IvParameterSpec(v2_1));
            return v0_1.doFinal(p6, 0, p6.length);
        } catch (java.security.InvalidKeyException v4_8) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_8.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_8);
        } catch (java.security.InvalidKeyException v4_7) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_7);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_5 = new StringBuilder();
            v6_5.append("IV invalid: ");
            v6_5.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_2 = new StringBuilder();
            v6_2.append("key invalid: ");
            v6_2.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_5);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder$1.recoverSessionData() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public byte[] recoverSessionData(int p4, byte[] p5, byte[] p6)
    {
        try {
            if ((p6 == null) || (p6.length <= 0)) {
                String v6_4 = new byte[(p5.length + 1)];
                v6_4[0] = ((byte) p4);
                System.arraycopy(p5, 0, v6_4, 1, p5.length);
                return v6_4;
            } else {
                byte[] v4_2 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
                javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder.access$000(this.this$0);
                int v1_1 = new StringBuilder();
                v1_1.append(v4_2);
                v1_1.append("/CFB/NoPadding");
                javax.crypto.Cipher v0_3 = v0_2.createCipher(v1_1.toString());
                byte[] v5_2 = new byte[v0_3.getBlockSize()];
                v0_3.init(2, new javax.crypto.spec.SecretKeySpec(p5, v4_2), new javax.crypto.spec.IvParameterSpec(v5_2));
                return v0_3.doFinal(p6);
            }
        } catch (byte[] v4_6) {
            throw new org.spongycastle.openpgp.PGPException("Exception recovering session info", v4_6);
        }
    }

Method org.spongycastle.cms.jcajce.JcePasswordRecipientInfoGenerator.generateEncryptedBytes() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public byte[] generateEncryptedBytes(org.spongycastle.asn1.x509.AlgorithmIdentifier p5, byte[] p6, org.spongycastle.operator.GenericKey p7)
    {
        String v7_1 = this.helper.getJceKey(p7);
        String v0_4 = this.helper.createRFC3211Wrapper(p5.getAlgorithm());
        try {
            v0_4.init(3, new javax.crypto.spec.SecretKeySpec(p6, v0_4.getAlgorithm()), new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(p5.getParameters()).getOctets()));
            return v0_4.wrap(v7_1);
        } catch (java.security.GeneralSecurityException v5_6) {
            String v7_3 = new StringBuilder();
            v7_3.append("cannot process content encryption key: ");
            v7_3.append(v5_6.getMessage());
            throw new org.spongycastle.cms.CMSException(v7_3.toString(), v5_6);
        }
    }

Method org.spongycastle.cms.jcajce.JcePasswordRecipient.extractSecretKey() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.Key extractSecretKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p5, org.spongycastle.asn1.x509.AlgorithmIdentifier p6, byte[] p7, byte[] p8)
    {
        javax.crypto.Cipher v0_1 = this.helper.createRFC3211Wrapper(p5.getAlgorithm());
        try {
            v0_1.init(4, new javax.crypto.spec.SecretKeySpec(p7, v0_1.getAlgorithm()), new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(p5.getParameters()).getOctets()));
            return v0_1.unwrap(p8, p6.getAlgorithm().getId(), 3);
        } catch (java.security.GeneralSecurityException v5_6) {
            String v7_2 = new StringBuilder();
            v7_2.append("cannot process content encryption key: ");
            v7_2.append(v5_6.getMessage());
            throw new org.spongycastle.cms.CMSException(v7_2.toString(), v5_6);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder$MyPGPDataEncryptor.<init>() calling method javax.crypto.spec.IvParameterSpec.<init>()


    JcePGPDataEncryptorBuilder$MyPGPDataEncryptor(org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder p4, byte[] p5)
    {
        this.this$0 = p4;
        this.c = org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$200(p4).createStreamCipher(org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$000(p4), org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$100(p4));
        try {
            if (!org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$100(p4)) {
                this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$000(p4), p5));
            } else {
                javax.crypto.Cipher v0_4 = new byte[this.c.getBlockSize()];
                this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(org.spongycastle.openpgp.operator.jcajce.JcePGPDataEncryptorBuilder.access$000(p4), p5), new javax.crypto.spec.IvParameterSpec(v0_4));
            }
        } catch (javax.crypto.SecretKey v4_6) {
            javax.crypto.Cipher v0_10 = new StringBuilder();
            v0_10.append("invalid key: ");
            v0_10.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_10.toString(), v4_6);
        } catch (javax.crypto.SecretKey v4_5) {
            javax.crypto.Cipher v0_7 = new StringBuilder();
            v0_7.append("imvalid algorithm parameter: ");
            v0_7.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_7.toString(), v4_5);
        }
        return;
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder$1.encryptKeyData() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public byte[] encryptKeyData(byte[] p4, byte[] p5, byte[] p6, int p7, int p8)
    {
        try {
            javax.crypto.Cipher v0_3 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(this.encAlgorithm));
            v1_3.append("/CFB/NoPadding");
            this.c = v0_3.createCipher(v1_3.toString());
            this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(this.encAlgorithm, p4), new javax.crypto.spec.IvParameterSpec(p5));
            this.iv = p5;
            return this.c.doFinal(p6, p7, p8);
        } catch (java.security.InvalidAlgorithmParameterException v4_7) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_7);
        } catch (java.security.InvalidAlgorithmParameterException v4_6) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_6);
        } catch (java.security.InvalidAlgorithmParameterException v4_5) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid key: ");
            v6_5.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_5);
        } catch (java.security.InvalidAlgorithmParameterException v4_4) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid iv: ");
            v6_2.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_4);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder$1.recoverKeyData() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public byte[] recoverKeyData(int p4, byte[] p5, byte[] p6, byte[] p7, int p8, int p9)
    {
        try {
            javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            v1_3.append("/CFB/NoPadding");
            javax.crypto.Cipher v0_1 = v0_2.createCipher(v1_3.toString());
            v0_1.init(2, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(p4, p5), new javax.crypto.spec.IvParameterSpec(p6));
            return v0_1.doFinal(p7, p8, p9);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_5);
        } catch (java.security.InvalidKeyException v4_4) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid parameter: ");
            v6_5.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_4);
        } catch (java.security.InvalidKeyException v4_3) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_3);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEProtectionRemoverFactory$1.recoverKeyData() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public byte[] recoverKeyData(int p4, byte[] p5, byte[] p6, byte[] p7, int p8, int p9)
    {
        try {
            javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBEProtectionRemoverFactory.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            v1_3.append("/CBC/NoPadding");
            javax.crypto.Cipher v0_1 = v0_2.createCipher(v1_3.toString());
            v0_1.init(2, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(p4, p5), new javax.crypto.spec.IvParameterSpec(p6));
            return v0_1.doFinal(p7, p8, p9);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_5);
        } catch (java.security.InvalidKeyException v4_4) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid parameter: ");
            v6_5.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_4);
        } catch (java.security.InvalidKeyException v4_3) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_3);
        }
    }

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


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(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.iv);
        }
    }

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


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[32];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.SM4$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("SM4");
            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.SEED$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.RC6$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.RC5$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.RC2$AlgParams.localEngineGetParameterSpec() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(Class p3)
    {
        if (p3 == javax.crypto.spec.RC2ParameterSpec) {
            short v0_2 = this.parameterVersion;
            if (v0_2 != -1) {
                if (v0_2 >= 256) {
                    return new javax.crypto.spec.RC2ParameterSpec(v0_2, this.iv);
                } else {
                    return new javax.crypto.spec.RC2ParameterSpec(org.spongycastle.jcajce.provider.symmetric.RC2$AlgParams.ekb[v0_2], this.iv);
                }
            }
        }
        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.iv);
        }
    }

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


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        RuntimeException v1_6;
        if (this.spec != null) {
            try {
                v1_6 = this.createParametersInstance("RC2");
                v1_6.init(this.spec);
            } catch (String v0_8) {
                throw new RuntimeException(v0_8.getMessage());
            }
        } else {
            String v0_3 = new byte[8];
            if (this.random == null) {
                this.random = new java.security.SecureRandom();
            }
            this.random.nextBytes(v0_3);
            try {
                v1_6 = this.createParametersInstance("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.Noekeon$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.IDEA$AlgParams.localEngineGetParameterSpec() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(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.iv);
        }
    }

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


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.GOST28147$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.DESede$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.DES$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.Camellia$AlgParamGen.engineGenerateParameters() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.CAST5$AlgParams.localEngineGetParameterSpec() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(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.iv);
        }
    }

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


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[8];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.AES$AlgParamsGCM.localEngineGetParameterSpec() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(Class p4)
    {
        if ((p4 != java.security.spec.AlgorithmParameterSpec) && (!org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.isGcmSpec(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.gcmParams.getNonce());
            }
        } else {
            if (!org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.gcmSpecExists()) {
                return new javax.crypto.spec.IvParameterSpec(this.gcmParams.getNonce());
            } else {
                return org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.extractGcmSpec(this.gcmParams.toASN1Primitive());
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.AES$AlgParamsCCM.localEngineGetParameterSpec() calling method javax.crypto.spec.IvParameterSpec.<init>()


    protected java.security.spec.AlgorithmParameterSpec localEngineGetParameterSpec(Class p4)
    {
        if ((p4 != java.security.spec.AlgorithmParameterSpec) && (!org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.isGcmSpec(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.ccmParams.getNonce());
            }
        } else {
            if (!org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.gcmSpecExists()) {
                return new javax.crypto.spec.IvParameterSpec(this.ccmParams.getNonce());
            } else {
                return org.spongycastle.jcajce.provider.symmetric.GcmSpecUtil.extractGcmSpec(this.ccmParams.toASN1Primitive());
            }
        }
    }

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


    protected java.security.AlgorithmParameters engineGenerateParameters()
    {
        String v0_1 = new byte[16];
        if (this.random == null) {
            this.random = new java.security.SecureRandom();
        }
        this.random.nextBytes(v0_1);
        try {
            RuntimeException v1_0 = this.createParametersInstance("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.keystore.pkcs12.PKCS12KeyStoreSpi.createCipher() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private javax.crypto.Cipher createCipher(int p11, char[] p12, org.spongycastle.asn1.x509.AlgorithmIdentifier p13)
    {
        javax.crypto.SecretKey v12_1;
        byte[] v13_2 = org.spongycastle.asn1.pkcs.PBES2Parameters.getInstance(p13.getParameters());
        javax.crypto.Cipher v0_8 = org.spongycastle.asn1.pkcs.PBKDF2Params.getInstance(v13_2.getKeyDerivationFunc().getParameters());
        org.spongycastle.jcajce.spec.GOST28147ParameterSpec v1_1 = org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v13_2.getEncryptionScheme());
        org.spongycastle.asn1.ASN1ObjectIdentifier v2_1 = this.helper.createSecretKeyFactory(v13_2.getKeyDerivationFunc().getAlgorithm().getId());
        if (!v0_8.isDefaultPrf()) {
            org.spongycastle.jcajce.spec.PBKDF2KeySpec v9 = new org.spongycastle.jcajce.spec.PBKDF2KeySpec;
            v9(p12, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.keySizeProvider.getKeySize(v1_1), v0_8.getPrf());
            v12_1 = v2_1.generateSecret(v9);
        } else {
            v12_1 = v2_1.generateSecret(new javax.crypto.spec.PBEKeySpec(p12, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.keySizeProvider.getKeySize(v1_1)));
        }
        javax.crypto.Cipher v0_6 = javax.crypto.Cipher.getInstance(v13_2.getEncryptionScheme().getAlgorithm().getId());
        org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v13_2.getEncryptionScheme());
        byte[] v13_4 = v13_2.getEncryptionScheme().getParameters();
        if (!(v13_4 instanceof org.spongycastle.asn1.ASN1OctetString)) {
            byte[] v13_5 = org.spongycastle.asn1.cryptopro.GOST28147Parameters.getInstance(v13_4);
            v0_6.init(p11, v12_1, new org.spongycastle.jcajce.spec.GOST28147ParameterSpec(v13_5.getEncryptionParamSet(), v13_5.getIV()));
        } else {
            v0_6.init(p11, v12_1, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(v13_4).getOctets()));
        }
        return v0_6;
    }

Method org.spongycastle.cms.jcajce.EnvelopedDataHelper$1.doInJCE() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public Object doInJCE()
    {
        javax.crypto.Cipher v0_1 = this.this$0.createCipher(this.val$encryptionAlgID.getAlgorithm());
        java.security.Key v1_14 = this.val$encryptionAlgID.getParameters();
        boolean v2_1 = this.val$encryptionAlgID.getAlgorithm().getId();
        if ((v1_14 == null) || ((v1_14 instanceof org.spongycastle.asn1.ASN1Null))) {
            if ((!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.DES_CBC.getId())) && ((!v2_1.equals(org.spongycastle.cms.CMSEnvelopedDataGenerator.DES_EDE3_CBC)) && ((!v2_1.equals("1.3.6.1.4.1.188.7.1.1.2")) && (!v2_1.equals("1.2.840.113533.7.66.10"))))) {
                v0_1.init(2, this.val$sKey);
            } else {
                javax.crypto.spec.IvParameterSpec v4_2 = new byte[8];
                v0_1.init(2, this.val$sKey, new javax.crypto.spec.IvParameterSpec(v4_2));
            }
        } else {
            try {
                javax.crypto.spec.IvParameterSpec v4_4 = this.this$0.createAlgorithmParameters(this.val$encryptionAlgID.getAlgorithm());
                org.spongycastle.cms.jcajce.CMSUtils.loadParameters(v4_4, v1_14);
                v0_1.init(2, this.val$sKey, v4_4);
            } catch (javax.crypto.spec.IvParameterSpec v4_5) {
                if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.DES_CBC.getId())) {
                    if (!v2_1.equals(org.spongycastle.cms.CMSEnvelopedDataGenerator.DES_EDE3_CBC)) {
                        if (!v2_1.equals("1.3.6.1.4.1.188.7.1.1.2")) {
                            if (!v2_1.equals(org.spongycastle.cms.CMSEnvelopedDataGenerator.AES128_CBC)) {
                                if (!v2_1.equals(org.spongycastle.cms.CMSEnvelopedDataGenerator.AES192_CBC)) {
                                    if (!v2_1.equals(org.spongycastle.cms.CMSEnvelopedDataGenerator.AES256_CBC)) {
                                        throw v4_5;
                                    }
                                }
                            }
                        }
                    }
                }
                v0_1.init(2, this.val$sKey, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(v1_14).getOctets()));
            }
        }
        return v0_1;
    }

Method org.spongycastle.cert.crmf.jcajce.CRMFHelper$1.doInJCE() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public Object doInJCE()
    {
        javax.crypto.Cipher v0_1 = this.this$0.createCipher(this.val$encryptionAlgID.getAlgorithm());
        java.security.Key v1_14 = ((org.spongycastle.asn1.ASN1Primitive) this.val$encryptionAlgID.getParameters());
        boolean v2_1 = this.val$encryptionAlgID.getAlgorithm();
        if ((v1_14 == null) || ((v1_14 instanceof org.spongycastle.asn1.ASN1Null))) {
            if ((!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.DES_EDE3_CBC)) && ((!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.IDEA_CBC)) && (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.CAST5_CBC)))) {
                v0_1.init(2, this.val$sKey);
            } else {
                java.io.IOException v4_2 = new byte[8];
                v0_1.init(2, this.val$sKey, new javax.crypto.spec.IvParameterSpec(v4_2));
            }
        } else {
            try {
                java.io.IOException v4_4 = this.this$0.createAlgorithmParameters(this.val$encryptionAlgID.getAlgorithm());
            } catch (java.io.IOException v4_6) {
                if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.DES_EDE3_CBC)) {
                    if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.IDEA_CBC)) {
                        if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.AES128_CBC)) {
                            if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.AES192_CBC)) {
                                if (!v2_1.equals(org.spongycastle.cms.CMSAlgorithm.AES256_CBC)) {
                                    throw v4_6;
                                }
                            }
                        }
                    }
                }
                v0_1.init(2, this.val$sKey, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(v1_14).getOctets()));
            }
            org.spongycastle.jcajce.util.AlgorithmParametersUtils.loadParameters(v4_4, v1_14);
            v0_1.init(2, this.val$sKey, v4_4);
        }
        return v0_1;
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.encrypt() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public String encrypt(String p8)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            String v1_2 = new StringBuilder();
            v1_2.append("Encrypt version:");
            v1_2.append(this.mBlobVersion);
            android.util.Log.v("StorageHelper", v1_2.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_7 = new byte[16];
            this.mRandom.nextBytes(v1_7);
            byte[] v2_4 = new javax.crypto.spec.IvParameterSpec(v1_7);
            byte[] v3_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_1.init(1, this.mKey, v2_4);
            IllegalArgumentException v8_3 = v3_1.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_7);
            byte[] v2_6 = v4_1.doFinal();
            byte[] v3_6 = new byte[(((v0_6.length + v8_3.length) + v1_7.length) + v2_6.length)];
            System.arraycopy(v0_6, 0, v3_6, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_6, v0_6.length, v8_3.length);
            System.arraycopy(v1_7, 0, v3_6, (v0_6.length + v8_3.length), v1_7.length);
            System.arraycopy(v2_6, 0, v3_6, ((v0_6.length + v8_3.length) + v1_7.length), v2_6.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_6, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.decrypt() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public String decrypt(String p12)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_7 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_7, 0, 4, "UTF_8");
                    int v5_1 = new StringBuilder();
                    v5_1.append("Encrypt version:");
                    v5_1.append(v1_9);
                    android.util.Log.v("StorageHelper", v5_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_5 = ((v12_7.length - 16) - 32);
                    int v7_1 = (v12_7.length - 32);
                    int v8 = (v5_5 - 4);
                    if ((v5_5 < 0) || ((v7_1 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_7, 0, v7_1);
                        this.assertHMac(v12_7, v7_1, v12_7.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_7, v5_5, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_7, 4, v8), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method org.spongycastle.openssl.jcajce.PEMUtilities.crypt() calling method javax.crypto.spec.IvParameterSpec.<init>()


    static byte[] crypt(boolean p13, org.spongycastle.jcajce.util.JcaJceHelper p14, byte[] p15, char[] p16, String p17, byte[] p18)
    {
        byte[] v3_13 = new javax.crypto.spec.IvParameterSpec(p18);
        int v4_0 = "CBC";
        int v6_2 = "PKCS5Padding";
        if (p17.endsWith("-CFB")) {
            v4_0 = "CFB";
            v6_2 = "NoPadding";
        }
        if ((!p17.endsWith("-ECB")) && ((!"DES-EDE".equals(p17)) && (!"DES-EDE3".equals(p17)))) {
            javax.crypto.spec.RC2ParameterSpec v7_1 = v3_13;
        } else {
            v4_0 = "ECB";
            v7_1 = 0;
        }
        String v9;
        String v8;
        if (!p17.endsWith("-OFB")) {
            v8 = v4_0;
            v9 = v6_2;
        } else {
            v8 = "OFB";
            v9 = "NoPadding";
        }
        String v11;
        String v1_2;
        int v10 = 1;
        if (!p17.startsWith("DES-EDE")) {
            if (!p17.startsWith("DES-")) {
                if (!p17.startsWith("BF-")) {
                    int v6_0 = 128;
                    if (!p17.startsWith("RC2-")) {
                        if (!p17.startsWith("AES-")) {
                            throw new org.spongycastle.openssl.EncryptionException("unknown encryption with private key");
                        } else {
                            byte[] v3_21;
                            v11 = "AES";
                            if (p18.length <= 8) {
                                v3_21 = p18;
                            } else {
                                v3_21 = new byte[8];
                                System.arraycopy(p18, 0, v3_21, 0, 8);
                            }
                            if (!p17.startsWith("AES-128-")) {
                                if (!p17.startsWith("AES-192-")) {
                                    if (!p17.startsWith("AES-256-")) {
                                        throw new org.spongycastle.openssl.EncryptionException("unknown AES encryption with private key");
                                    } else {
                                        v6_0 = 256;
                                    }
                                } else {
                                    v6_0 = 192;
                                }
                            }
                            v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "AES", (v6_0 / 8), v3_21);
                        }
                    } else {
                        v11 = "RC2";
                        if (!p17.startsWith("RC2-40-")) {
                            if (p17.startsWith("RC2-64-")) {
                                v6_0 = 64;
                            }
                        } else {
                            v6_0 = 40;
                        }
                        v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "RC2", (v6_0 / 8), p18);
                        if (v7_1 != null) {
                            v7_1 = new javax.crypto.spec.RC2ParameterSpec(v6_0, p18);
                        } else {
                            v7_1 = new javax.crypto.spec.RC2ParameterSpec(v6_0);
                        }
                    }
                } else {
                    v11 = "Blowfish";
                    v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "Blowfish", 16, p18);
                }
            } else {
                v11 = "DES";
                v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "DES", 8, p18);
            }
        } else {
            v11 = "DESede";
            v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "DESede", 24, p18, (p17.startsWith("DES-EDE3") ^ 1));
        }
        javax.crypto.spec.RC2ParameterSpec v2_7 = new StringBuilder();
        v2_7.append(v11);
        v2_7.append("/");
        v2_7.append(v8);
        v2_7.append("/");
        v2_7.append(v9);
        try {
            org.spongycastle.openssl.EncryptionException v0_0 = p14.createCipher(v2_7.toString());
        } catch (org.spongycastle.openssl.EncryptionException v0_1) {
            throw new org.spongycastle.openssl.EncryptionException("exception using cipher - please check password and data.", v0_1);
        }
        if (!p13) {
            v10 = 2;
        } else {
        }
        if (v7_1 != null) {
            v0_0.init(v10, v1_2, v7_1);
        } else {
            v0_0.init(v10, v1_2);
        }
        return v0_0.doFinal(p15);
    }

Method org.spongycastle.openpgp.operator.jcajce.OperatorHelper.createDataDecryptor() calling method javax.crypto.spec.IvParameterSpec.<init>()


    org.spongycastle.openpgp.operator.PGPDataDecryptor createDataDecryptor(boolean p3, int p4, byte[] p5)
    {
        try {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p5, org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            org.spongycastle.openpgp.PGPException v4_3 = this.createStreamCipher(p4, p3);
        } catch (org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_4) {
            throw v3_4;
        } catch (org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_3) {
            throw new org.spongycastle.openpgp.PGPException("Exception creating cipher", v3_3);
        }
        if (p3 == null) {
            v4_3.init(2, v0_1);
        } else {
            org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_2 = new byte[v4_3.getBlockSize()];
            v4_3.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(v3_2));
        }
        return new org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1(this, v4_3);
    }

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private static byte[] a(byte[] p3, byte[] p4, byte[] p5, int p6)
    {
        try {
            javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v0_1.init(p6, new javax.crypto.spec.SecretKeySpec(p3, "AES"), new javax.crypto.spec.IvParameterSpec(p4));
            return v0_1.doFinal(p5);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_11) {
            throw new UnsupportedOperationException("The specified algorithm is unknown", v3_11);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_10) {
            throw new UnsupportedOperationException("The specified padding is unknown", v3_10);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_8) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_8);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_6) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_6);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_4) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_4);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_2) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_2);
        }
    }

Method com.sophos.jbase.i.j() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private static declared_synchronized javax.crypto.spec.IvParameterSpec j()
    {
        try {
            byte[] v1_5 = com.sophos.jbase.JBPreferences.a(com.sophos.jbase.i.f).b(com.sophos.jbase.JBPreferences$Preferences.PREF_SOPHOS_SKEY_IV);
        } catch (byte[] v1_1) {
            throw v1_1;
        }
        if ((v1_5 == null) || (v1_5.isEmpty())) {
            return 0;
        } else {
            return new javax.crypto.spec.IvParameterSpec(android.util.Base64.decode(v1_5, 1));
        }
    }

Method com.sophos.jbase.i.i() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private static declared_synchronized byte[] i()
    {
        try {
            if (com.sophos.jbase.i.e == null) {
                com.sophos.jbase.i.e = new javax.crypto.spec.IvParameterSpec(com.sophos.jbase.JBKey.getIvFromData(com.sophos.jbase.JBPreferences.b(com.sophos.jbase.i.f).getBytes(com.sophos.jbase.JBKey.UTF8)));
            }
        } catch (byte[] v1_2) {
            throw v1_2;
        }
        return com.sophos.jbase.i.e.getIV();
    }

Method com.sophos.jbase.i.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public static declared_synchronized void a(String p6, byte[] p7)
    {
        if (p6 == 0) {
            if (p7 != null) {
                if (p7.length != 0) {
                    if (android.os.Build$VERSION.SDK_INT >= 23) {
                        if (ark>com.sophos.jbase.iark>.f != null) {
                            int v6_6;
                            boolean v1_2 = ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, 0);
                            if (p7 != null) {
                                if (ark>com.sophos.jbase.iark>.d == null) {
                                    ark>com.sophos.jbase.iark>.d = new com.sophos.jbase.JBKey(p7, com.sophos.jbase.JBKey$JBCryptAlgorithm.JBAES, com.sophos.jbase.JBKey$JBKeySize.JBKeySize256);
                                    ark>com.sophos.jbase.iark>.k();
                                    if ((p6 != 0) && (p6.length() > 1)) {
                                        ark>com.sophos.jbase.iark>.i(p6);
                                    }
                                    int v6_4;
                                    int v6_3 = com.sophos.jbase.JBPreferences.a(ark>com.sophos.jbase.iark>.f).b(com.sophos.jbase.JBPreferences$Preferences.DEK_IV);
                                    if (!v6_3.isEmpty()) {
                                        v6_4 = android.util.Base64.decode(v6_3, 3);
                                    } else {
                                        v6_4 = new byte[16];
                                        com.sophos.jbase.k.a(v6_4);
                                        com.sophos.jbase.JBPreferences.a(ark>com.sophos.jbase.iark>.f).b(com.sophos.jbase.JBPreferences$Preferences.DEK_IV, android.util.Base64.encodeToString(v6_4, 1));
                                    }
                                    ark>com.sophos.jbase.iark>.e = new javax.crypto.spec.IvParameterSpec(v6_4);
                                    com.sophos.jbase.l.a(p7);
                                    v6_6 = 1;
                                } else {
                                    v6_6 = ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, p6);
                                }
                            } else {
                                v6_6 = ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, p6);
                            }
                            if (!v1_2) {
                                v1_2 = ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, 1);
                            }
                            if ((v6_6 != 0) && (v1_2)) {
                                ark>com.sophos.jbase.iark>.d(ark>com.sophos.jbase.iark>.f);
                            }
                            return;
                        } else {
                            return;
                        }
                    } else {
                        return;
                    }
                } else {
                }
            }
            return;
        } else {
            if (p6.length() == 0) {
            }
        }
    }

Method com.sophos.jbase.c.b() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public static byte[] b(byte[] p4, int p5, int p6, com.sophos.jbase.JBKey p7, byte[] p8)
    {
        try {
            if (p8 != null) {
                p7.getKey().init(1, p7.getKeySpec(), new javax.crypto.spec.IvParameterSpec(p8));
            } else {
                p7.getKey().init(1, p7.getKeySpec());
            }
        } catch (java.security.InvalidKeyException) {
            throw new com.sophos.jbase.JBException(12, "InvalidKeyException");
        } catch (java.security.InvalidAlgorithmParameterException) {
            throw new com.sophos.jbase.JBException(12, "InvalidAlgorithmParameterException");
        } catch (javax.crypto.IllegalBlockSizeException) {
            throw new com.sophos.jbase.JBException(12, "IllegalBlockSizeException");
        } catch (javax.crypto.BadPaddingException) {
            throw new com.sophos.jbase.JBException(12, "BadPaddingException");
        }
        return p7.getKey().doFinal(p4, p5, p6);
    }

Method com.sophos.jbase.c.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public static byte[] a(byte[] p4, int p5, int p6, com.sophos.jbase.JBKey p7, byte[] p8)
    {
        try {
            if (p8 != null) {
                p7.getKey().init(2, p7.getKeySpec(), new javax.crypto.spec.IvParameterSpec(p8));
            } else {
                p7.getKey().init(2, p7.getKeySpec());
            }
        } catch (java.security.InvalidKeyException) {
            throw new com.sophos.jbase.JBException(12, "InvalidKeyException");
        } catch (java.security.InvalidAlgorithmParameterException) {
            throw new com.sophos.jbase.JBException(12, "InvalidAlgorithmParameterException");
        } catch (javax.crypto.IllegalBlockSizeException) {
            throw new com.sophos.jbase.JBException(12, "IllegalBlockSizeException");
        } catch (javax.crypto.BadPaddingException) {
            throw new com.sophos.jbase.JBException(12, "BadPaddingException");
        }
        return p7.getKey().doFinal(p4, p5, p6);
    }

Method com.sophos.jbase.JBKey.initCipher() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public void initCipher(int p3, byte[] p4, String p5)
    {
        try {
            if ((this.a == null) || (!p5.equals(this.a.getAlgorithm()))) {
                this.a = javax.crypto.Cipher.getInstance(p5);
            }
        } catch (com.sophos.jbase.JBException v3_10) {
            String v5_10 = new StringBuilder();
            v5_10.append("InvalidKeyException: ");
            v5_10.append(v3_10.getMessage());
            throw new com.sophos.jbase.JBException(12, v5_10.toString());
        } catch (com.sophos.jbase.JBException v3_7) {
            String v5_8 = new StringBuilder();
            v5_8.append("InvalidAlgorithmParameterException: ");
            v5_8.append(v3_7.getMessage());
            throw new com.sophos.jbase.JBException(12, v5_8.toString());
        }
        if (p4 == null) {
            this.a.init(p3, this.mKeySpec);
        } else {
            this.a.init(p3, this.mKeySpec, new javax.crypto.spec.IvParameterSpec(p4));
        }
        return;
    }

Method com.nimbusds.jose.crypto.b.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private static javax.crypto.Cipher a(javax.crypto.SecretKey p2, boolean p3, byte[] p4, java.security.Provider p5)
    {
        try {
            javax.crypto.Cipher v5_1 = com.nimbusds.jose.crypto.k.a("AES/CBC/PKCS5Padding", p5);
            javax.crypto.spec.SecretKeySpec v0_2 = new javax.crypto.spec.SecretKeySpec(p2.getEncoded(), "AES");
            Exception v2_4 = new javax.crypto.spec.IvParameterSpec(p4);
        } catch (Exception v2_1) {
            throw new com.nimbusds.jose.JOSEException(v2_1.getMessage(), v2_1);
        }
        if (p3 == 0) {
            v5_1.init(2, v0_2, v2_4);
        } else {
            v5_1.init(1, v0_2, v2_4);
        }
        return v5_1;
    }

Method com.microsoft.aad.adal.StorageHelper.encrypt() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public String encrypt(String p8)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v2_1 = new StringBuilder();
            v2_1.append("Encrypt version:");
            v2_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v2_1.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_5 = new byte[16];
            this.mRandom.nextBytes(v1_5);
            byte[] v2_5 = new javax.crypto.spec.IvParameterSpec(v1_5);
            byte[] v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_3.init(1, this.mKey, v2_5);
            IllegalArgumentException v8_3 = v3_3.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_5);
            byte[] v2_7 = v4_1.doFinal();
            byte[] v3_8 = new byte[(((v0_6.length + v8_3.length) + v1_5.length) + v2_7.length)];
            System.arraycopy(v0_6, 0, v3_8, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_8, v0_6.length, v8_3.length);
            System.arraycopy(v1_5, 0, v3_8, (v0_6.length + v8_3.length), v1_5.length);
            System.arraycopy(v2_7, 0, v3_8, ((v0_6.length + v8_3.length) + v1_5.length), v2_7.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_8, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.aad.adal.StorageHelper.decrypt() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public String decrypt(String p12)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Starting decryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_8 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_8, 0, 4, "UTF_8");
                    int v6_1 = new StringBuilder();
                    v6_1.append("Encrypt version:");
                    v6_1.append(v1_9);
                    com.microsoft.aad.adal.Logger.i("StorageHelper:decrypt", "", v6_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_3 = ((v12_8.length - 16) - 32);
                    int v7_2 = (v12_8.length - 32);
                    int v8 = (v5_3 - 4);
                    if ((v5_3 < 0) || ((v7_2 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_8, 0, v7_2);
                        this.assertHMac(v12_8, v7_2, v12_8.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_8, v5_3, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_8, 4, v8), "UTF_8");
                        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method com.baidu.android.pushservice.j.a.b() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public static byte[] b(String p2, String p3, byte[] p4)
    {
        if ((!android.text.TextUtils.isEmpty(p2)) && ((!android.text.TextUtils.isEmpty(p3)) && (p4 != null))) {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
            javax.crypto.Cipher v3_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v3_2.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
            return v3_2.doFinal(p4);
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.j.a.a() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public static byte[] a(String p2, String p3, byte[] p4)
    {
        javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
        javax.crypto.Cipher v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
        v3_3.init(1, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
        return v3_3.doFinal(p4);
    }

Method org.spongycastle.jcajce.provider.symmetric.util.BaseStreamCipher.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.pbeSpec = 0;
        this.pbeAlgorithm = 0;
        this.engineParams = 0;
        if (!(p11 instanceof javax.crypto.SecretKey)) {
            org.spongycastle.crypto.params.ParametersWithIV v12_12 = new StringBuilder();
            v12_12.append("Key for algorithm ");
            v12_12.append(p11.getAlgorithm());
            v12_12.append(" not suitable for symmetric enryption.");
            throw new java.security.InvalidKeyException(v12_12.toString());
        } else {
            org.spongycastle.crypto.params.ParametersWithIV v12_5;
            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.CipherParameters v0_9 = new org.spongycastle.crypto.params.ParametersWithIV(new org.spongycastle.crypto.params.KeyParameter(p11.getEncoded()), ((javax.crypto.spec.IvParameterSpec) p12).getIV());
                            this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v0_9);
                            v12_5 = v0_9;
                        }
                    } else {
                        if (this.digest > 0) {
                            throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                        } else {
                            v12_5 = new org.spongycastle.crypto.params.KeyParameter(p11.getEncoded());
                        }
                    }
                } else {
                    if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getOID() == null) {
                        this.pbeAlgorithm = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getAlgorithm();
                    } else {
                        this.pbeAlgorithm = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getOID().getId();
                    }
                    if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getParam() == null) {
                        if (!(p12 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            throw new java.security.InvalidAlgorithmParameterException("PBE requires PBE parameters to be set.");
                        } else {
                            org.spongycastle.crypto.CipherParameters v0_19 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11), p12, this.cipher.getAlgorithmName());
                            this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p12);
                            v12_5 = v0_19;
                        }
                    } else {
                        v12_5 = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p11).getParam();
                        this.pbeSpec = 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).getIvSize() != 0) {
                        this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v12_5);
                    }
                }
            } else {
                this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p12);
                if (((((org.spongycastle.jcajce.PKCS12Key) p11) instanceof org.spongycastle.jcajce.PKCS12KeyWithParameters)) && (this.pbeSpec == null)) {
                    this.pbeSpec = 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_5 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((org.spongycastle.jcajce.PKCS12Key) p11).getEncoded(), 2, this.digest, this.keySizeInBits, (this.ivLength * 8), this.pbeSpec, this.cipher.getAlgorithmName());
            }
            if ((this.ivLength != 0) && (!(v12_5 instanceof org.spongycastle.crypto.params.ParametersWithIV))) {
                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_11 = new byte[this.ivLength];
                    p13.nextBytes(v11_11);
                    org.spongycastle.crypto.params.ParametersWithIV v13_3 = new org.spongycastle.crypto.params.ParametersWithIV(v12_5, v11_11);
                    this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v13_3);
                    v12_5 = v13_3;
                }
            }
            try {
                switch (p10) {
                    case 1:
                    case 3:
                        this.cipher.init(1, v12_5);
                        return;
                    case 2:
                    case 4:
                        this.cipher.init(0, v12_5);
                        return;
                    default:
                        org.spongycastle.crypto.params.ParametersWithIV v12_7 = new StringBuilder();
                        v12_7.append("unknown opmode ");
                        v12_7.append(p10);
                        v12_7.append(" passed");
                        throw new java.security.InvalidParameterException(v12_7.toString());
                }
            } catch (java.security.InvalidAlgorithmParameterException v10_7) {
            }
            throw new java.security.InvalidKeyException(v10_7.getMessage());
        }
    }

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


    protected void engineInit(int p18, java.security.Key p19, java.security.spec.AlgorithmParameterSpec p20, java.security.SecureRandom p21)
    {
        String v5_2 = 0;
        this.pbeSpec = 0;
        this.pbeAlgorithm = 0;
        this.engineParams = 0;
        this.aeadParams = 0;
        if (!(p19 instanceof javax.crypto.SecretKey)) {
            org.spongycastle.crypto.params.ParametersWithIV v3_1 = new StringBuilder();
            v3_1.append("Key for algorithm ");
            v3_1.append(p19.getAlgorithm());
            v3_1.append(" not suitable for symmetric enryption.");
            throw new java.security.InvalidKeyException(v3_1.toString());
        } else {
            if ((p20 == null) && (this.baseEngine.getAlgorithmName().startsWith("RC5-64"))) {
                throw new java.security.InvalidAlgorithmParameterException("RC5 requires an RC5ParametersSpec to be passed in.");
            } else {
                reflect.Method v6_51 = this.scheme;
                if ((v6_51 != 2) && (!(p19 instanceof org.spongycastle.jcajce.PKCS12Key))) {
                    if (!(p19 instanceof org.spongycastle.jcajce.PBKDF1Key)) {
                        if (!(p19 instanceof org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey)) {
                            if (!(p19 instanceof javax.crypto.interfaces.PBEKey)) {
                                if (!(p19 instanceof org.spongycastle.jcajce.spec.RepeatedSecretKeySpec)) {
                                    if ((v6_51 == null) || ((v6_51 == 4) || ((v6_51 == 1) || (v6_51 == 5)))) {
                                        throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                                    } else {
                                        v5_2 = new org.spongycastle.crypto.params.KeyParameter(p19.getEncoded());
                                    }
                                }
                            } else {
                                this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p20);
                                if (((((javax.crypto.interfaces.PBEKey) p19) instanceof org.spongycastle.jcajce.PKCS12KeyWithParameters)) && (this.pbeSpec == null)) {
                                    this.pbeSpec = new javax.crypto.spec.PBEParameterSpec(((javax.crypto.interfaces.PBEKey) p19).getSalt(), ((javax.crypto.interfaces.PBEKey) p19).getIterationCount());
                                }
                                v5_2 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((javax.crypto.interfaces.PBEKey) p19).getEncoded(), this.scheme, this.digest, this.keySizeInBits, (this.ivLength * 8), this.pbeSpec, this.cipher.getAlgorithmName());
                                if ((v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                    this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v5_2);
                                }
                            }
                        } else {
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getOID() == null) {
                                this.pbeAlgorithm = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getAlgorithm();
                            } else {
                                this.pbeAlgorithm = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getOID().getId();
                            }
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getParam() == null) {
                                if (!(p20 instanceof javax.crypto.spec.PBEParameterSpec)) {
                                    throw new java.security.InvalidAlgorithmParameterException("PBE requires PBE parameters to be set.");
                                } else {
                                    this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p20);
                                    v5_2 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19), p20, this.cipher.getUnderlyingCipher().getAlgorithmName());
                                }
                            } else {
                                v5_2 = this.adjustParameters(p20, ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getParam());
                            }
                            if ((v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v5_2);
                            }
                        }
                    } else {
                        if ((p20 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p20);
                        }
                        if (((((org.spongycastle.jcajce.PBKDF1Key) p19) instanceof org.spongycastle.jcajce.PBKDF1KeyWithParameters)) && (this.pbeSpec == null)) {
                            this.pbeSpec = new javax.crypto.spec.PBEParameterSpec(((org.spongycastle.jcajce.PBKDF1KeyWithParameters) ((org.spongycastle.jcajce.PBKDF1Key) p19)).getSalt(), ((org.spongycastle.jcajce.PBKDF1KeyWithParameters) ((org.spongycastle.jcajce.PBKDF1Key) p19)).getIterationCount());
                        }
                        v5_2 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((org.spongycastle.jcajce.PBKDF1Key) p19).getEncoded(), 0, this.digest, this.keySizeInBits, (this.ivLength * 8), this.pbeSpec, this.cipher.getAlgorithmName());
                        if ((v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                            this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v5_2);
                        }
                    }
                } else {
                    try {
                        if ((p20 instanceof javax.crypto.spec.PBEParameterSpec)) {
                            this.pbeSpec = ((javax.crypto.spec.PBEParameterSpec) p20);
                        }
                    } catch (Exception) {
                        throw new java.security.InvalidKeyException("PKCS12 requires a SecretKey/PBEKey");
                    }
                    reflect.Method v6_28 = (((javax.crypto.SecretKey) p19) instanceof javax.crypto.interfaces.PBEKey);
                    if ((v6_28 != null) && (this.pbeSpec == null)) {
                        this.pbeSpec = new javax.crypto.spec.PBEParameterSpec(((javax.crypto.interfaces.PBEKey) ((javax.crypto.SecretKey) p19)).getSalt(), ((javax.crypto.interfaces.PBEKey) ((javax.crypto.SecretKey) p19)).getIterationCount());
                    }
                    if ((this.pbeSpec == null) && (v6_28 == null)) {
                        throw new java.security.InvalidKeyException("Algorithm requires a PBE key");
                    } else {
                        if (!(p19 instanceof org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey)) {
                            v5_2 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((javax.crypto.SecretKey) p19).getEncoded(), 2, this.digest, this.keySizeInBits, (this.ivLength * 8), this.pbeSpec, this.cipher.getAlgorithmName());
                        } else {
                            if (((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getParam() == null) {
                                v5_2 = org.spongycastle.jcajce.provider.symmetric.util.PBE$Util.makePBEParameters(((javax.crypto.SecretKey) p19).getEncoded(), 2, this.digest, this.keySizeInBits, (this.ivLength * 8), this.pbeSpec, this.cipher.getAlgorithmName());
                            } else {
                                v5_2 = ((org.spongycastle.jcajce.provider.symmetric.util.BCPBEKey) p19).getParam();
                            }
                        }
                        if ((v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                            this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v5_2);
                        }
                    }
                }
                if (!(p20 instanceof javax.crypto.spec.IvParameterSpec)) {
                    if (!(p20 instanceof org.spongycastle.jcajce.spec.GOST28147ParameterSpec)) {
                        if (!(p20 instanceof javax.crypto.spec.RC2ParameterSpec)) {
                            if (!(p20 instanceof javax.crypto.spec.RC5ParameterSpec)) {
                                String v2_7 = org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher.gcmSpecClass;
                                if ((v2_7 == null) || (!v2_7.isInstance(p20))) {
                                    if ((p20 != null) && (!(p20 instanceof javax.crypto.spec.PBEParameterSpec))) {
                                        throw new java.security.InvalidAlgorithmParameterException("unknown parameter type.");
                                    }
                                } else {
                                    if ((!this.isAEADModeName(this.modeName)) && (!(this.cipher instanceof org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher$AEADGenericBlockCipher))) {
                                        throw new java.security.InvalidAlgorithmParameterException("GCMParameterSpec can only be used with AEAD modes.");
                                    } else {
                                        try {
                                            String v5_14;
                                            org.spongycastle.crypto.params.AEADParameters v9_6 = new Class[0];
                                            String v2_17 = org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher.gcmSpecClass.getDeclaredMethod("getTLen", v9_6);
                                            Object[] v10_4 = new Class[0];
                                            reflect.Method v6_43 = org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher.gcmSpecClass.getDeclaredMethod("getIV", v10_4);
                                        } catch (Exception) {
                                            throw new java.security.InvalidAlgorithmParameterException("Cannot process GCMParameterSpec.");
                                        }
                                        if (!(v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                            v5_14 = ((org.spongycastle.crypto.params.KeyParameter) v5_2);
                                        } else {
                                            v5_14 = ((org.spongycastle.crypto.params.KeyParameter) ((org.spongycastle.crypto.params.ParametersWithIV) v5_2).getParameters());
                                        }
                                        Object[] v10_5 = new Object[0];
                                        Object[] v10_6 = new Object[0];
                                        org.spongycastle.crypto.params.AEADParameters v9_10 = new org.spongycastle.crypto.params.AEADParameters(v5_14, ((Integer) v2_17.invoke(p20, v10_5)).intValue(), ((byte[]) ((byte[]) v6_43.invoke(p20, v10_6))));
                                        this.aeadParams = v9_10;
                                        v5_2 = v9_10;
                                    }
                                }
                            } else {
                                v5_2 = new org.spongycastle.crypto.params.RC5Parameters(p19.getEncoded(), ((javax.crypto.spec.RC5ParameterSpec) p20).getRounds());
                                if (!this.baseEngine.getAlgorithmName().startsWith("RC5")) {
                                    throw new java.security.InvalidAlgorithmParameterException("RC5 parameters passed to a cipher that is not RC5.");
                                } else {
                                    if (!this.baseEngine.getAlgorithmName().equals("RC5-32")) {
                                        if ((this.baseEngine.getAlgorithmName().equals("RC5-64")) && (((javax.crypto.spec.RC5ParameterSpec) p20).getWordSize() != 64)) {
                                            String v2_36 = new StringBuilder();
                                            v2_36.append("RC5 already set up for a word size of 64 not ");
                                            v2_36.append(((javax.crypto.spec.RC5ParameterSpec) p20).getWordSize());
                                            v2_36.append(".");
                                            throw new java.security.InvalidAlgorithmParameterException(v2_36.toString());
                                        }
                                    } else {
                                        if (((javax.crypto.spec.RC5ParameterSpec) p20).getWordSize() != 32) {
                                            String v2_40 = new StringBuilder();
                                            v2_40.append("RC5 already set up for a word size of 32 not ");
                                            v2_40.append(((javax.crypto.spec.RC5ParameterSpec) p20).getWordSize());
                                            v2_40.append(".");
                                            throw new java.security.InvalidAlgorithmParameterException(v2_40.toString());
                                        }
                                    }
                                    if ((((javax.crypto.spec.RC5ParameterSpec) p20).getIV() != null) && (this.ivLength != 0)) {
                                        String v2_46;
                                        if (!(v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                            v2_46 = new org.spongycastle.crypto.params.ParametersWithIV(v5_2, ((javax.crypto.spec.RC5ParameterSpec) p20).getIV());
                                        } else {
                                            v2_46 = new org.spongycastle.crypto.params.ParametersWithIV(((org.spongycastle.crypto.params.ParametersWithIV) v5_2).getParameters(), ((javax.crypto.spec.RC5ParameterSpec) p20).getIV());
                                        }
                                        this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v2_46);
                                        v5_2 = v2_46;
                                    }
                                }
                            }
                        } else {
                            v5_2 = new org.spongycastle.crypto.params.RC2Parameters(p19.getEncoded(), ((javax.crypto.spec.RC2ParameterSpec) p20).getEffectiveKeyBits());
                            if ((((javax.crypto.spec.RC2ParameterSpec) p20).getIV() != null) && (this.ivLength != 0)) {
                                String v2_53;
                                if (!(v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                    v2_53 = new org.spongycastle.crypto.params.ParametersWithIV(v5_2, ((javax.crypto.spec.RC2ParameterSpec) p20).getIV());
                                } else {
                                    v2_53 = new org.spongycastle.crypto.params.ParametersWithIV(((org.spongycastle.crypto.params.ParametersWithIV) v5_2).getParameters(), ((javax.crypto.spec.RC2ParameterSpec) p20).getIV());
                                }
                                this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v2_53);
                                v5_2 = v2_53;
                            }
                        }
                    } else {
                        v5_2 = new org.spongycastle.crypto.params.ParametersWithSBox(new org.spongycastle.crypto.params.KeyParameter(p19.getEncoded()), ((org.spongycastle.jcajce.spec.GOST28147ParameterSpec) p20).getSbox());
                        if ((((org.spongycastle.jcajce.spec.GOST28147ParameterSpec) p20).getIV() != null) && (this.ivLength != 0)) {
                            String v2_61;
                            if (!(v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                v2_61 = new org.spongycastle.crypto.params.ParametersWithIV(v5_2, ((org.spongycastle.jcajce.spec.GOST28147ParameterSpec) p20).getIV());
                            } else {
                                v2_61 = new org.spongycastle.crypto.params.ParametersWithIV(((org.spongycastle.crypto.params.ParametersWithIV) v5_2).getParameters(), ((org.spongycastle.jcajce.spec.GOST28147ParameterSpec) p20).getIV());
                            }
                            this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v2_61);
                            v5_2 = v2_61;
                        }
                    }
                } else {
                    if (this.ivLength == 0) {
                        String v2_64 = this.modeName;
                        if ((v2_64 != null) && (v2_64.equals("ECB"))) {
                            throw new java.security.InvalidAlgorithmParameterException("ECB mode does not use an IV");
                        }
                    } else {
                        if ((((javax.crypto.spec.IvParameterSpec) p20).getIV().length != this.ivLength) && ((!(this.cipher instanceof org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher$AEADGenericBlockCipher)) && (this.fixedIv))) {
                            String v2_70 = new StringBuilder();
                            v2_70.append("IV must be ");
                            v2_70.append(this.ivLength);
                            v2_70.append(" bytes long.");
                            throw new java.security.InvalidAlgorithmParameterException(v2_70.toString());
                        } else {
                            if (!(v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) {
                                v5_2 = new org.spongycastle.crypto.params.ParametersWithIV(v5_2, ((javax.crypto.spec.IvParameterSpec) p20).getIV());
                            } else {
                                v5_2 = new org.spongycastle.crypto.params.ParametersWithIV(((org.spongycastle.crypto.params.ParametersWithIV) v5_2).getParameters(), ((javax.crypto.spec.IvParameterSpec) p20).getIV());
                            }
                            this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v5_2);
                        }
                    }
                }
                if ((this.ivLength == 0) || (((v5_2 instanceof org.spongycastle.crypto.params.ParametersWithIV)) || ((v5_2 instanceof org.spongycastle.crypto.params.AEADParameters)))) {
                    String v2_86 = v5_2;
                } else {
                    String v2_79;
                    if (p21 != null) {
                        v2_79 = p21;
                    } else {
                        v2_79 = new java.security.SecureRandom();
                    }
                    if ((p18 != 1) && (p18 != 3)) {
                        if (this.cipher.getUnderlyingCipher().getAlgorithmName().indexOf("PGPCFB") < 0) {
                            throw new java.security.InvalidAlgorithmParameterException("no IV set when one expected");
                        }
                    } else {
                        org.spongycastle.crypto.params.ParametersWithIV v3_42 = new byte[this.ivLength];
                        v2_79.nextBytes(v3_42);
                        v2_86 = new org.spongycastle.crypto.params.ParametersWithIV(v5_2, v3_42);
                        this.ivParam = ((org.spongycastle.crypto.params.ParametersWithIV) v2_86);
                    }
                }
                if ((p21 != null) && (this.padded)) {
                    v2_86 = new org.spongycastle.crypto.params.ParametersWithRandom(v2_86, p21);
                }
                try {
                    switch (p18) {
                        case 1:
                        case 3:
                            this.cipher.init(1, v2_86);
                            return;
                        case 2:
                        case 4:
                            this.cipher.init(0, v2_86);
                            return;
                        default:
                            org.spongycastle.crypto.params.ParametersWithIV v3_49 = new StringBuilder();
                            v3_49.append("unknown opmode ");
                            v3_49.append(p18);
                            v3_49.append(" passed");
                            throw new java.security.InvalidParameterException(v3_49.toString());
                    }
                } catch (java.security.InvalidAlgorithmParameterException v0_34) {
                }
                throw new org.spongycastle.jcajce.provider.symmetric.util.BaseBlockCipher$1(this, v0_34.getMessage(), v0_34);
            }
        }
    }

Method com.nimbusds.jose.jwk.RSAKey.load() calling method java.security.Key.getAlgorithm()


    public static com.nimbusds.jose.jwk.RSAKey load(java.security.KeyStore p2, String p3, char[] p4)
    {
        String v0_0 = p2.getCertificate(p3);
        if ((v0_0 != null) && ((v0_0 instanceof java.security.cert.X509Certificate))) {
            String v0_7 = ((java.security.cert.X509Certificate) v0_0);
            if (!(v0_7.getPublicKey() instanceof java.security.interfaces.RSAPublicKey)) {
                throw new com.nimbusds.jose.JOSEException("Couldn\'t load RSA JWK: The key algorithm is not RSA");
            } else {
                String v0_4 = new com.nimbusds.jose.jwk.RSAKey$a(com.nimbusds.jose.jwk.RSAKey.parse(v0_7)).a(p3).a(p2).a();
                try {
                    com.nimbusds.jose.jwk.RSAKey v2_3 = p2.getKey(p3, p4);
                } catch (com.nimbusds.jose.jwk.RSAKey v2_4) {
                    String v4_2 = new StringBuilder("Couldn\'t retrieve private RSA key (bad pin?): ");
                    v4_2.append(v2_4.getMessage());
                    throw new com.nimbusds.jose.JOSEException(v4_2.toString(), v2_4);
                }
                if (!(v2_3 instanceof java.security.interfaces.RSAPrivateKey)) {
                    if ((!(v2_3 instanceof java.security.PrivateKey)) || (!"RSA".equalsIgnoreCase(v2_3.getAlgorithm()))) {
                        return v0_4;
                    } else {
                        return new com.nimbusds.jose.jwk.RSAKey$a(v0_4).a(((java.security.PrivateKey) v2_3)).a();
                    }
                } else {
                    return new com.nimbusds.jose.jwk.RSAKey$a(v0_4).a(((java.security.interfaces.RSAPrivateKey) v2_3)).a();
                }
            }
        } else {
            return 0;
        }
    }

Method com.nimbusds.jose.jwk.ECKey.load() calling method java.security.Key.getAlgorithm()


    public static com.nimbusds.jose.jwk.ECKey load(java.security.KeyStore p2, String p3, char[] p4)
    {
        String v0_0 = p2.getCertificate(p3);
        if ((v0_0 != null) && ((v0_0 instanceof java.security.cert.X509Certificate))) {
            String v0_7 = ((java.security.cert.X509Certificate) v0_0);
            if (!(v0_7.getPublicKey() instanceof java.security.interfaces.ECPublicKey)) {
                throw new com.nimbusds.jose.JOSEException("Couldn\'t load EC JWK: The key algorithm is not EC");
            } else {
                String v0_4 = new com.nimbusds.jose.jwk.ECKey$a(com.nimbusds.jose.jwk.ECKey.parse(v0_7)).a(p3).a(p2).a();
                try {
                    com.nimbusds.jose.jwk.ECKey v2_3 = p2.getKey(p3, p4);
                } catch (com.nimbusds.jose.jwk.ECKey v2_4) {
                    String v4_2 = new StringBuilder("Couldn\'t retrieve private EC key (bad pin?): ");
                    v4_2.append(v2_4.getMessage());
                    throw new com.nimbusds.jose.JOSEException(v4_2.toString(), v2_4);
                }
                if (!(v2_3 instanceof java.security.interfaces.ECPrivateKey)) {
                    if ((!(v2_3 instanceof java.security.PrivateKey)) || (!"EC".equalsIgnoreCase(v2_3.getAlgorithm()))) {
                        return v0_4;
                    } else {
                        return new com.nimbusds.jose.jwk.ECKey$a(v0_4).a(((java.security.PrivateKey) v2_3)).a();
                    }
                } else {
                    return new com.nimbusds.jose.jwk.ECKey$a(v0_4).a(((java.security.interfaces.ECPrivateKey) v2_3)).a();
                }
            }
        } else {
            return 0;
        }
    }

Method org.spongycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.encodeKey() calling method java.security.Key.getAlgorithm()


    private void encodeKey(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 com.sophos.smsec.plugin.appprotection.gui.blocking.AuthorizeFingerPrintDialog.b() calling method javax.crypto.KeyGenerator.getInstance()


    private void b()
    {
        this.e = new com.sophos.smsec.plugin.appprotection.h(this, this.getContext());
        if (this.e.a()) {
            try {
                android.hardware.fingerprint.FingerprintManager$CryptoObject v0_1 = java.security.KeyStore.getInstance("AndroidKeyStore");
                this.a(v0_1, javax.crypto.KeyGenerator.getInstance("AES", "AndroidKeyStore"));
            } catch (android.hardware.fingerprint.FingerprintManager$CryptoObject v0_10) {
                com.sophos.smsec.core.smsectrace.d.c("AP_FINGERPRINT", "Cannot init fingerprint authorization", v0_10);
            } catch (android.hardware.fingerprint.FingerprintManager$CryptoObject v0_9) {
                com.sophos.smsec.core.smsectrace.d.c("AP_FINGERPRINT", "Unexpected exception: cannot init fingerprint authorization", v0_9);
            }
            if (!this.a(v0_1)) {
                this.g = new android.hardware.fingerprint.FingerprintManager$CryptoObject(this.f);
            } else {
                this.g = new android.hardware.fingerprint.FingerprintManager$CryptoObject(this.f);
                this.e.a(this.g);
            }
        }
        return;
    }

Method com.sophos.keepasseditor.ui.dialogs.PasswordEnterDialogFragment.a() calling method javax.crypto.KeyGenerator.getInstance()


    private void a(android.view.View p4)
    {
        this.i = new com.sophos.keepasseditor.utils.c(this, this.getContext());
        if (this.i.a()) {
            if (p4 != null) {
                String v4_1 = p4.findViewById(com.sophos.keepasseditor.g$c.fingerprint_container);
                if (v4_1 != null) {
                    v4_1.setVisibility(0);
                }
            }
            try {
                String v4_3 = java.security.KeyStore.getInstance("AndroidKeyStore");
                this.a(v4_3, javax.crypto.KeyGenerator.getInstance("AES", "AndroidKeyStore"));
            } catch (String v4_12) {
                this.a(this.getString(com.sophos.keepasseditor.g$f.fingerprint_error), 0);
                com.sophos.smsec.core.smsectrace.d.c("PasswordEnterDialogFrag", "", v4_12);
            }
            if (!this.a(v4_3)) {
                this.k = new android.hardware.fingerprint.FingerprintManager$CryptoObject(this.j);
                this.a(this.getString(com.sophos.keepasseditor.g$f.new_fingerprint_enrolled_description), 0);
            } else {
                this.k = new android.hardware.fingerprint.FingerprintManager$CryptoObject(this.j);
                this.i.a(this.k);
            }
        }
        return;
    }

Method org.spongycastle.jcajce.util.ProviderJcaJceHelper.createKeyGenerator() calling method javax.crypto.KeyGenerator.getInstance()


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

Method org.spongycastle.jcajce.util.NamedJcaJceHelper.createKeyGenerator() calling method javax.crypto.KeyGenerator.getInstance()


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

Method com.sophos.jbase.i.a() calling method javax.crypto.KeyGenerator.getInstance()


    private static javax.crypto.Cipher a(int p7, String p8)
    {
        if ((p8 != null) && (!p8.isEmpty())) {
            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "secrets not currently supported.");
        }
        if (android.os.Build$VERSION.SDK_INT < 23) {
            return 0;
        } else {
            if ((p7 >= 1) && (p7 <= 4)) {
                try {
                    javax.crypto.Cipher v2_3;
                    int v3 = (p7 - 1);
                } catch (long v7_6) {
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v7_6);
                    throw v7_6;
                } catch (long v7_4) {
                    String v8_10 = new android.security.keystore.UserNotAuthenticatedException(v7_4.getMessage(), v7_4);
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_10);
                    throw v8_10;
                } catch (long v7_1) {
                    com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_1);
                    return 0;
                } catch (long v7_2) {
                    if (v7_2.getMessage().contains("lock screen")) {
                        String v8_6 = new android.security.keystore.UserNotAuthenticatedException(v7_2.getMessage(), v7_2);
                        ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_6);
                        throw v8_6;
                    } else {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_2);
                        return 0;
                    }
                }
                if (ark>com.sophos.jbase.iark>.k[v3] == null) {
                    v2_3 = javax.crypto.Cipher.getInstance("AES/CBC/NoPadding");
                } else {
                    v2_3 = ark>com.sophos.jbase.iark>.k[v3];
                }
                if ((ark>com.sophos.jbase.iark>.i == null) || (!ark>com.sophos.jbase.iark>.i.containsAlias("JBaseSKeyWrapperKEK"))) {
                    String v4_3 = 0;
                } else {
                    if (!ark>com.sophos.jbase.iark>.c()) {
                        v4_3 = ark>com.sophos.jbase.iark>.b();
                    } else {
                        if (!ark>com.sophos.jbase.iark>.e()) {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. could not create new key.");
                        } else {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. created new key.");
                        }
                        v4_3 = 0;
                    }
                }
                String v8_14;
                if (v4_3 != null) {
                    v8_14 = v4_3.getSecretKey();
                } else {
                    String v8_17 = new android.security.keystore.KeyGenParameterSpec$Builder("JBaseSKeyWrapperKEK", 3).setKeySize(256).setBlockModes(new String[] {"CBC"})).setEncryptionPaddings(new String[] {"NoPadding"})).setRandomizedEncryptionRequired(1).build();
                    String v4_14 = javax.crypto.KeyGenerator.getInstance("AES", "AndroidKeyStore");
                    v4_14.init(v8_17);
                    try {
                        v8_14 = v4_14.generateKey();
                    } catch (String v8_18) {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "unexpected exception while generating key.", v8_18);
                        v8_14 = 0;
                    }
                }
                if (v8_14 == null) {
                    return 0;
                } else {
                    if (p7 == 4) {
                        javax.crypto.spec.IvParameterSpec v0_9 = ark>com.sophos.jbase.iark>.j();
                        if (v0_9 != null) {
                            v2_3.init(p7, v8_14, v0_9);
                        } else {
                            com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "no stored IV, cipher not initialized yet.");
                            return 0;
                        }
                    } else {
                        if (p7 != 2) {
                            v2_3.init(p7, v8_14);
                        } else {
                        }
                    }
                    ark>com.sophos.jbase.iark>.k[v3] = v2_3;
                    ark>com.sophos.jbase.iark>.l = 0;
                    return v2_3;
                }
            } else {
                return 0;
            }
        }
    }

Method com.microsoft.aad.adal.StorageHelper.generateSecretKey() calling method javax.crypto.KeyGenerator.getInstance()


    private javax.crypto.SecretKey generateSecretKey()
    {
        javax.crypto.SecretKey v0_1 = javax.crypto.KeyGenerator.getInstance("AES");
        v0_1.init(256, this.mRandom);
        return v0_1.generateKey();
    }

Method com.sophos.smsec.plugin.appprotection.gui.blocking.AuthorizeFingerPrintDialog.a() calling method javax.crypto.KeyGenerator.generateKey()


    public void a(java.security.KeyStore p3, javax.crypto.KeyGenerator p4)
    {
        try {
            p3.load(0);
            p4.init(new android.security.keystore.KeyGenParameterSpec$Builder("smsec_fingerprint_key", 3).setBlockModes(new String[] {"CBC"})).setUserAuthenticationRequired(1).setEncryptionPaddings(new String[] {"PKCS7Padding"})).build());
            p4.generateKey();
        } catch (Exception v3_6) {
            com.sophos.smsec.core.smsectrace.d.a(v3_6);
        }
        return;
    }

Method com.sophos.keepasseditor.ui.dialogs.PasswordEnterDialogFragment.a() calling method javax.crypto.KeyGenerator.generateKey()


    public void a(java.security.KeyStore p3, javax.crypto.KeyGenerator p4)
    {
        try {
            p3.load(0);
            p4.init(new android.security.keystore.KeyGenParameterSpec$Builder("keepass_fingerprint_key", 3).setBlockModes(new String[] {"CBC"})).setUserAuthenticationRequired(1).setEncryptionPaddings(new String[] {"PKCS7Padding"})).build());
            p4.generateKey();
            return;
        } catch (java.security.NoSuchAlgorithmException v3_6) {
            throw new RuntimeException(v3_6);
        }
    }

Method org.spongycastle.cms.jcajce.JceCMSMacCalculatorBuilder$CMSMacCalculator.<init>() calling method javax.crypto.KeyGenerator.generateKey()


    JceCMSMacCalculatorBuilder$CMSMacCalculator(org.spongycastle.cms.jcajce.JceCMSMacCalculatorBuilder p2, org.spongycastle.asn1.ASN1ObjectIdentifier p3, int p4, java.security.SecureRandom p5)
    {
        this.this$0 = p2;
        javax.crypto.KeyGenerator v0_1 = org.spongycastle.cms.jcajce.JceCMSMacCalculatorBuilder.access$000(p2).createKeyGenerator(p3);
        if (p5 == null) {
            p5 = new java.security.SecureRandom();
        }
        this.random = p5;
        if (p4 >= null) {
            v0_1.init(p4, p5);
        } else {
            v0_1.init(p5);
        }
        this.encKey = v0_1.generateKey();
        this.algorithmIdentifier = org.spongycastle.cms.jcajce.JceCMSMacCalculatorBuilder.access$000(p2).getAlgorithmIdentifier(p3, this.generateParameterSpec(p3, this.encKey));
        this.mac = org.spongycastle.cms.jcajce.JceCMSMacCalculatorBuilder.access$000(p2).createContentMac(this.encKey, this.algorithmIdentifier);
        return;
    }

Method org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder$CMSOutputEncryptor.<init>() calling method javax.crypto.KeyGenerator.generateKey()


    JceCMSContentEncryptorBuilder$CMSOutputEncryptor(org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder p4, org.spongycastle.asn1.ASN1ObjectIdentifier p5, int p6, java.security.SecureRandom p7)
    {
        this.this$0 = p4;
        javax.crypto.Cipher v0_3 = org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder.access$000(p4).createKeyGenerator(p5);
        if (p7 == null) {
            p7 = new java.security.SecureRandom();
        }
        if (p6 >= null) {
            v0_3.init(p6, p7);
        } else {
            v0_3.init(p7);
        }
        this.cipher = org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder.access$000(p4).createCipher(p5);
        this.encKey = v0_3.generateKey();
        java.security.AlgorithmParameters v6_5 = org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder.access$000(p4).generateParameters(p5, this.encKey, p7);
        try {
            this.cipher.init(1, this.encKey, v6_5, p7);
        } catch (org.spongycastle.asn1.x509.AlgorithmIdentifier v4_1) {
            java.security.AlgorithmParameters v6_7 = new StringBuilder();
            v6_7.append("unable to initialize cipher: ");
            v6_7.append(v4_1.getMessage());
            throw new org.spongycastle.cms.CMSException(v6_7.toString(), v4_1);
        }
        if (v6_5 == null) {
            v6_5 = this.cipher.getParameters();
        }
        this.algorithmIdentifier = org.spongycastle.cms.jcajce.JceCMSContentEncryptorBuilder.access$000(p4).getAlgorithmIdentifier(p5, v6_5);
        return;
    }

Method org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder$CRMFOutputEncryptor.<init>() calling method javax.crypto.KeyGenerator.generateKey()


    JceCRMFEncryptorBuilder$CRMFOutputEncryptor(org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder p4, org.spongycastle.asn1.ASN1ObjectIdentifier p5, int p6, java.security.SecureRandom p7)
    {
        this.this$0 = p4;
        javax.crypto.Cipher v0_3 = org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.access$000(p4).createKeyGenerator(p5);
        if (p7 == null) {
            p7 = new java.security.SecureRandom();
        }
        if (p6 < null) {
            p6 = org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.access$100().getKeySize(p5);
        }
        if (p6 >= null) {
            v0_3.init(p6, p7);
        } else {
            v0_3.init(p7);
        }
        this.cipher = org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.access$000(p4).createCipher(p5);
        this.encKey = v0_3.generateKey();
        java.security.AlgorithmParameters v6_6 = org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.access$000(p4).generateParameters(p5, this.encKey, p7);
        try {
            this.cipher.init(1, this.encKey, v6_6, p7);
        } catch (org.spongycastle.asn1.x509.AlgorithmIdentifier v4_1) {
            java.security.AlgorithmParameters v6_8 = new StringBuilder();
            v6_8.append("unable to initialize cipher: ");
            v6_8.append(v4_1.getMessage());
            throw new org.spongycastle.cert.crmf.CRMFException(v6_8.toString(), v4_1);
        }
        if (v6_6 == null) {
            v6_6 = this.cipher.getParameters();
        }
        this.algorithmIdentifier = org.spongycastle.cert.crmf.jcajce.JceCRMFEncryptorBuilder.access$000(p4).getAlgorithmIdentifier(p5, v6_6);
        return;
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.generateSecretKey() calling method javax.crypto.KeyGenerator.generateKey()


    private javax.crypto.SecretKey generateSecretKey()
    {
        javax.crypto.SecretKey v0_1 = javax.crypto.KeyGenerator.getInstance("AES");
        v0_1.init(256, this.mRandom);
        return v0_1.generateKey();
    }

Method com.sophos.jbase.i.a() calling method javax.crypto.KeyGenerator.generateKey()


    private static javax.crypto.Cipher a(int p7, String p8)
    {
        if ((p8 != null) && (!p8.isEmpty())) {
            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "secrets not currently supported.");
        }
        if (android.os.Build$VERSION.SDK_INT < 23) {
            return 0;
        } else {
            if ((p7 >= 1) && (p7 <= 4)) {
                try {
                    javax.crypto.Cipher v2_3;
                    int v3 = (p7 - 1);
                } catch (long v7_6) {
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v7_6);
                    throw v7_6;
                } catch (long v7_4) {
                    String v8_10 = new android.security.keystore.UserNotAuthenticatedException(v7_4.getMessage(), v7_4);
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_10);
                    throw v8_10;
                } catch (long v7_1) {
                    com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_1);
                    return 0;
                } catch (long v7_2) {
                    if (v7_2.getMessage().contains("lock screen")) {
                        String v8_6 = new android.security.keystore.UserNotAuthenticatedException(v7_2.getMessage(), v7_2);
                        ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_6);
                        throw v8_6;
                    } else {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_2);
                        return 0;
                    }
                }
                if (ark>com.sophos.jbase.iark>.k[v3] == null) {
                    v2_3 = javax.crypto.Cipher.getInstance("AES/CBC/NoPadding");
                } else {
                    v2_3 = ark>com.sophos.jbase.iark>.k[v3];
                }
                if ((ark>com.sophos.jbase.iark>.i == null) || (!ark>com.sophos.jbase.iark>.i.containsAlias("JBaseSKeyWrapperKEK"))) {
                    String v4_3 = 0;
                } else {
                    if (!ark>com.sophos.jbase.iark>.c()) {
                        v4_3 = ark>com.sophos.jbase.iark>.b();
                    } else {
                        if (!ark>com.sophos.jbase.iark>.e()) {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. could not create new key.");
                        } else {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. created new key.");
                        }
                        v4_3 = 0;
                    }
                }
                String v8_14;
                if (v4_3 != null) {
                    v8_14 = v4_3.getSecretKey();
                } else {
                    String v8_17 = new android.security.keystore.KeyGenParameterSpec$Builder("JBaseSKeyWrapperKEK", 3).setKeySize(256).setBlockModes(new String[] {"CBC"})).setEncryptionPaddings(new String[] {"NoPadding"})).setRandomizedEncryptionRequired(1).build();
                    String v4_14 = javax.crypto.KeyGenerator.getInstance("AES", "AndroidKeyStore");
                    v4_14.init(v8_17);
                    try {
                        v8_14 = v4_14.generateKey();
                    } catch (String v8_18) {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "unexpected exception while generating key.", v8_18);
                        v8_14 = 0;
                    }
                }
                if (v8_14 == null) {
                    return 0;
                } else {
                    if (p7 == 4) {
                        javax.crypto.spec.IvParameterSpec v0_9 = ark>com.sophos.jbase.iark>.j();
                        if (v0_9 != null) {
                            v2_3.init(p7, v8_14, v0_9);
                        } else {
                            com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "no stored IV, cipher not initialized yet.");
                            return 0;
                        }
                    } else {
                        if (p7 != 2) {
                            v2_3.init(p7, v8_14);
                        } else {
                        }
                    }
                    ark>com.sophos.jbase.iark>.k[v3] = v2_3;
                    ark>com.sophos.jbase.iark>.l = 0;
                    return v2_3;
                }
            } else {
                return 0;
            }
        }
    }

Method com.microsoft.aad.adal.StorageHelper.generateSecretKey() calling method javax.crypto.KeyGenerator.generateKey()


    private javax.crypto.SecretKey generateSecretKey()
    {
        javax.crypto.SecretKey v0_1 = javax.crypto.KeyGenerator.getInstance("AES");
        v0_1.init(256, this.mRandom);
        return v0_1.generateKey();
    }

Method org.jscep.message.f$a.getRecipientOperator() calling method javax.crypto.Cipher.getInstance()


    public org.spongycastle.cms.RecipientOperator getRecipientOperator(org.spongycastle.asn1.x509.AlgorithmIdentifier p3, org.spongycastle.asn1.x509.AlgorithmIdentifier p4, byte[] p5)
    {
        if (!"1.3.14.3.2.7".equals(p4.getAlgorithm().getId())) {
            return super.getRecipientOperator(p3, p4, p5);
        } else {
            try {
                java.security.GeneralSecurityException v3_2 = this.a(this.a, p5);
                String v5_2 = javax.crypto.Cipher.getInstance("DES/CBC/PKCS5Padding");
                v5_2.init(2, v3_2, this.a(p4));
                return new org.spongycastle.cms.RecipientOperator(new org.jscep.message.f$a$1(this, p4, v5_2));
            } catch (java.security.GeneralSecurityException v3_5) {
                throw new org.spongycastle.cms.CMSException("Could not create DES cipher", v3_5);
            }
        }
    }

Method org.jscep.message.f$a.a() calling method javax.crypto.Cipher.getInstance()


    private java.security.Key a(java.security.PrivateKey p3, byte[] p4)
    {
        String v0_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_2.init(4, p3);
        try {
            return v0_2.unwrap(p4, "DES", 3);
        } catch (java.security.InvalidKeyException v3_1) {
            org.jscep.message.f.a().c("Cannot unwrap symetric key.  Are you using a valid key pair?");
            throw v3_1;
        }
    }

Method com.sophos.smsec.plugin.appprotection.gui.blocking.AuthorizeFingerPrintDialog.a() calling method javax.crypto.Cipher.getInstance()


    private boolean a(java.security.KeyStore p3)
    {
        try {
            p3.load(0);
            int v3_4 = ((javax.crypto.SecretKey) p3.getKey("smsec_fingerprint_key", 0));
            this.f = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
            this.f.init(1, v3_4);
            return 1;
        } catch (int v3_1) {
            if (!(v3_1 instanceof android.security.keystore.KeyPermanentlyInvalidatedException)) {
                throw new RuntimeException("Failed to init Cipher", v3_1);
            } else {
                return 0;
            }
        }
    }

Method com.sophos.keepasseditor.ui.dialogs.PasswordEnterDialogFragment.a() calling method javax.crypto.Cipher.getInstance()


    private boolean a(java.security.KeyStore p3)
    {
        try {
            p3.load(0);
            int v3_5 = ((javax.crypto.SecretKey) p3.getKey("keepass_fingerprint_key", 0));
            this.j = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
            this.j.init(1, v3_5);
            return 1;
        } catch (int v3_1) {
            throw new RuntimeException("Failed to init Cipher", v3_1);
        } catch (int v3_2) {
            if (!(v3_2 instanceof android.security.keystore.KeyPermanentlyInvalidatedException)) {
                throw new RuntimeException("Failed to init Cipher", v3_2);
            } else {
                return 0;
            }
        }
    }

Method com.sophos.smsdkex.communication.rest.KeyRingAuthCommandHandler.buildJson() calling method javax.crypto.Cipher.getInstance()


    public org.json.JSONObject buildJson()
    {
        org.json.JSONObject v0 = super.buildJson();
        android.content.Context v1_1 = new org.json.JSONObject();
        v1_1.put("user", this.mUser);
        String v2_0 = com.sophos.smsdkex.communication.SdkPreferences.getSgnKeyringSecret(this.getContext());
        try {
            String v3_2 = new com.sophos.jsceplib.d(this.getContext(), this.loadRestConfig().getCertificateSubjectCn(), this.loadRestConfig().getCertificateSubjectO(), this.loadRestConfig().getUniqueAppId()).a();
            String v6_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
            v6_3.init(2, v3_2);
            String v2_4 = v6_3.doFinal(android.util.Base64.decode(v2_0.getBytes(java.nio.charset.Charset.defaultCharset()), 2));
        } catch (String v2_6) {
            com.sophos.smsec.core.smsectrace.d.c("REST", "", v2_6);
            v2_4 = 0;
        } catch (String v2_5) {
            com.sophos.smsec.core.smsectrace.d.c("REST", "generic runtime exception during decryption.", v2_5);
            v2_4 = 0;
        }
        if (v2_4 != null) {
            String v3_8 = new com.sophos.jbase.JBKey(v2_4, com.sophos.jbase.JBKey$JBCryptAlgorithm.JBAES, com.sophos.jbase.JBKey$JBKeySize.JBKeySize256);
            String v2_8 = new byte[32];
            com.sophos.jbase.k.a(v2_8);
            String v2_9 = com.sophos.jbase.JBKey.getIvFromData(v2_8);
            try {
                v3_8.initCipher(1, v2_9);
                v1_1.put("password", android.util.Base64.encodeToString(com.sophos.jbase.c.b(this.mPassword.getBytes(), 0, this.mPassword.getBytes(java.nio.charset.Charset.defaultCharset()).length, v3_8, v2_9), 2));
            } catch (String v3_11) {
                com.sophos.smsec.core.smsectrace.d.b("REST", "", v3_11);
            }
            v1_1.put("passwordInitVector", android.util.Base64.encodeToString(v2_9, 2));
            v0.put("auth_data", v1_1);
        } else {
            com.sophos.smsec.core.smsectrace.d.h("decryption error.");
        }
        com.sophos.smsdkex.communication.SdkPreferences.setSgnKeyringSecret(this.getContext(), 0);
        return v0;
    }

Method org.spongycastle.jcajce.util.ProviderJcaJceHelper.createCipher() calling method javax.crypto.Cipher.getInstance()


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

Method org.spongycastle.jcajce.util.NamedJcaJceHelper.createCipher() calling method javax.crypto.Cipher.getInstance()


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

Method org.spongycastle.jcajce.util.DefaultJcaJceHelper.createCipher() calling method javax.crypto.Cipher.getInstance()


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

Method org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.createCipher() calling method javax.crypto.Cipher.getInstance()


    private javax.crypto.Cipher createCipher(int p11, char[] p12, org.spongycastle.asn1.x509.AlgorithmIdentifier p13)
    {
        javax.crypto.SecretKey v12_1;
        byte[] v13_2 = org.spongycastle.asn1.pkcs.PBES2Parameters.getInstance(p13.getParameters());
        javax.crypto.Cipher v0_8 = org.spongycastle.asn1.pkcs.PBKDF2Params.getInstance(v13_2.getKeyDerivationFunc().getParameters());
        org.spongycastle.jcajce.spec.GOST28147ParameterSpec v1_1 = org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v13_2.getEncryptionScheme());
        org.spongycastle.asn1.ASN1ObjectIdentifier v2_1 = this.helper.createSecretKeyFactory(v13_2.getKeyDerivationFunc().getAlgorithm().getId());
        if (!v0_8.isDefaultPrf()) {
            org.spongycastle.jcajce.spec.PBKDF2KeySpec v9 = new org.spongycastle.jcajce.spec.PBKDF2KeySpec;
            v9(p12, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.keySizeProvider.getKeySize(v1_1), v0_8.getPrf());
            v12_1 = v2_1.generateSecret(v9);
        } else {
            v12_1 = v2_1.generateSecret(new javax.crypto.spec.PBEKeySpec(p12, v0_8.getSalt(), v0_8.getIterationCount().intValue(), org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.keySizeProvider.getKeySize(v1_1)));
        }
        javax.crypto.Cipher v0_6 = javax.crypto.Cipher.getInstance(v13_2.getEncryptionScheme().getAlgorithm().getId());
        org.spongycastle.asn1.x509.AlgorithmIdentifier.getInstance(v13_2.getEncryptionScheme());
        byte[] v13_4 = v13_2.getEncryptionScheme().getParameters();
        if (!(v13_4 instanceof org.spongycastle.asn1.ASN1OctetString)) {
            byte[] v13_5 = org.spongycastle.asn1.cryptopro.GOST28147Parameters.getInstance(v13_4);
            v0_6.init(p11, v12_1, new org.spongycastle.jcajce.spec.GOST28147ParameterSpec(v13_5.getEncryptionParamSet(), v13_5.getIV()));
        } else {
            v0_6.init(p11, v12_1, new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(v13_4).getOctets()));
        }
        return v0_6;
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.encrypt() calling method javax.crypto.Cipher.getInstance()


    public String encrypt(String p8)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            String v1_2 = new StringBuilder();
            v1_2.append("Encrypt version:");
            v1_2.append(this.mBlobVersion);
            android.util.Log.v("StorageHelper", v1_2.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_7 = new byte[16];
            this.mRandom.nextBytes(v1_7);
            byte[] v2_4 = new javax.crypto.spec.IvParameterSpec(v1_7);
            byte[] v3_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_1.init(1, this.mKey, v2_4);
            IllegalArgumentException v8_3 = v3_1.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_7);
            byte[] v2_6 = v4_1.doFinal();
            byte[] v3_6 = new byte[(((v0_6.length + v8_3.length) + v1_7.length) + v2_6.length)];
            System.arraycopy(v0_6, 0, v3_6, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_6, v0_6.length, v8_3.length);
            System.arraycopy(v1_7, 0, v3_6, (v0_6.length + v8_3.length), v1_7.length);
            System.arraycopy(v2_6, 0, v3_6, ((v0_6.length + v8_3.length) + v1_7.length), v2_6.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_6, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.decrypt() calling method javax.crypto.Cipher.getInstance()


    public String decrypt(String p12)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_7 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_7, 0, 4, "UTF_8");
                    int v5_1 = new StringBuilder();
                    v5_1.append("Encrypt version:");
                    v5_1.append(v1_9);
                    android.util.Log.v("StorageHelper", v5_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_5 = ((v12_7.length - 16) - 32);
                    int v7_1 = (v12_7.length - 32);
                    int v8 = (v5_5 - 4);
                    if ((v5_5 < 0) || ((v7_1 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_7, 0, v7_1);
                        this.assertHMac(v12_7, v7_1, v12_7.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_7, v5_5, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_7, 4, v8), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.wrap() calling method javax.crypto.Cipher.getInstance()


    private byte[] wrap(javax.crypto.SecretKey p4)
    {
        android.util.Log.v("StorageHelper", "Wrap secret key.");
        javax.crypto.Cipher v0_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_2.init(3, this.mKeyPair.getPublic());
        return v0_2.wrap(p4);
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.unwrap() calling method javax.crypto.Cipher.getInstance()


    private javax.crypto.SecretKey unwrap(byte[] p4)
    {
        java.security.KeyStoreException v0_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_3.init(4, this.mKeyPair.getPrivate());
        try {
            return ((javax.crypto.SecretKey) v0_3.unwrap(p4, "AES", 3));
        } catch (IllegalArgumentException v4_3) {
            throw new java.security.KeyStoreException(v4_3);
        }
    }

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.Cipher.getInstance()


    private static byte[] a(byte[] p3, byte[] p4, byte[] p5, int p6)
    {
        try {
            javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v0_1.init(p6, new javax.crypto.spec.SecretKeySpec(p3, "AES"), new javax.crypto.spec.IvParameterSpec(p4));
            return v0_1.doFinal(p5);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_11) {
            throw new UnsupportedOperationException("The specified algorithm is unknown", v3_11);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_10) {
            throw new UnsupportedOperationException("The specified padding is unknown", v3_10);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_8) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_8);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_6) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_6);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_4) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_4);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_2) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_2);
        }
    }

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.Cipher.getInstance()


    public static byte[] a(byte[] p11, byte[] p12, long p13)
    {
        if (p11 == 0) {
            throw new IllegalArgumentException("Key must not be null");
        } else {
            if (p12 == null) {
                throw new IllegalArgumentException("Data must not be null");
            } else {
                if (p13 < 1) {
                    throw new IllegalArgumentException("Rounds must be > 1");
                } else {
                    try {
                        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance("AES/ECB/NoPadding");
                        v2_2.init(1, new javax.crypto.spec.SecretKeySpec(p11, "AES"));
                        long v9 = 0;
                    } catch (long v11_10) {
                        throw new UnsupportedOperationException("The specified algorithm is unknown", v11_10);
                    } catch (long v11_9) {
                        throw new UnsupportedOperationException("The specified padding is unknown", v11_9);
                    } catch (long v11_8) {
                        throw new de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException("The key has the wrong size. Have you installed Java Cryptography Extension (JCE)? Is the master key correct?", v11_8);
                    } catch (long v11_6) {
                        throw new AssertionError(v11_6);
                    }
                    while (v9 < p13) {
                        v2_2.update(p12, 0, 16, p12, 0);
                        v2_2.update(p12, 16, 16, p12, 16);
                        v9++;
                    }
                    return p12;
                }
            }
        }
    }

Method com.sophos.jbase.i.d() calling method javax.crypto.Cipher.getInstance()


    public static boolean d()
    {
        String v0_0 = com.sophos.jbase.i.b();
        if (v0_0 == null) {
            return 0;
        } else {
            try {
                javax.crypto.Cipher.getInstance("AES/CBC/NoPadding").init(3, v0_0.getSecretKey());
                return 1;
            } catch (String v0_3) {
                StringBuilder v3_1 = new StringBuilder();
                v3_1.append("isWrapperKeyAvailable: ");
                v3_1.append(v0_3.getMessage());
                com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", v3_1.toString());
                return 0;
            }
        }
    }

Method com.sophos.jbase.i.c() calling method javax.crypto.Cipher.getInstance()


    public static boolean c()
    {
        String v0_0 = com.sophos.jbase.i.b();
        if (v0_0 == null) {
            return 1;
        } else {
            try {
                javax.crypto.Cipher.getInstance("AES/CBC/NoPadding").init(3, v0_0.getSecretKey());
                return 0;
            } catch (String v0_2) {
                if (android.os.Build$VERSION.SDK_INT >= 23) {
                    if (!(v0_2 instanceof android.security.keystore.KeyPermanentlyInvalidatedException)) {
                        if ((v0_2 instanceof android.security.keystore.UserNotAuthenticatedException)) {
                            com.sophos.smsec.core.smsectrace.d.e("JBKeyStore", "user not authenticated, but key is valid.");
                            return 0;
                        }
                    } else {
                        return 1;
                    }
                }
                return 1;
            }
        }
    }

Method com.sophos.jbase.i.a() calling method javax.crypto.Cipher.getInstance()


    private static javax.crypto.Cipher a(int p7, String p8)
    {
        if ((p8 != null) && (!p8.isEmpty())) {
            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "secrets not currently supported.");
        }
        if (android.os.Build$VERSION.SDK_INT < 23) {
            return 0;
        } else {
            if ((p7 >= 1) && (p7 <= 4)) {
                try {
                    javax.crypto.Cipher v2_3;
                    int v3 = (p7 - 1);
                } catch (long v7_6) {
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v7_6);
                    throw v7_6;
                } catch (long v7_4) {
                    String v8_10 = new android.security.keystore.UserNotAuthenticatedException(v7_4.getMessage(), v7_4);
                    ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_10);
                    throw v8_10;
                } catch (long v7_1) {
                    com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_1);
                    return 0;
                } catch (long v7_2) {
                    if (v7_2.getMessage().contains("lock screen")) {
                        String v8_6 = new android.security.keystore.UserNotAuthenticatedException(v7_2.getMessage(), v7_2);
                        ark>com.sophos.jbase.iark>.a(ark>com.sophos.jbase.iark>.f, v8_6);
                        throw v8_6;
                    } else {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "failed to get key from store.", v7_2);
                        return 0;
                    }
                }
                if (ark>com.sophos.jbase.iark>.k[v3] == null) {
                    v2_3 = javax.crypto.Cipher.getInstance("AES/CBC/NoPadding");
                } else {
                    v2_3 = ark>com.sophos.jbase.iark>.k[v3];
                }
                if ((ark>com.sophos.jbase.iark>.i == null) || (!ark>com.sophos.jbase.iark>.i.containsAlias("JBaseSKeyWrapperKEK"))) {
                    String v4_3 = 0;
                } else {
                    if (!ark>com.sophos.jbase.iark>.c()) {
                        v4_3 = ark>com.sophos.jbase.iark>.b();
                    } else {
                        if (!ark>com.sophos.jbase.iark>.e()) {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. could not create new key.");
                        } else {
                            com.sophos.smsec.core.smsectrace.d.d("JBKeyStore", "last used key is invalid. Probably the system lock screen has been disabled or the password changed. created new key.");
                        }
                        v4_3 = 0;
                    }
                }
                String v8_14;
                if (v4_3 != null) {
                    v8_14 = v4_3.getSecretKey();
                } else {
                    String v8_17 = new android.security.keystore.KeyGenParameterSpec$Builder("JBaseSKeyWrapperKEK", 3).setKeySize(256).setBlockModes(new String[] {"CBC"})).setEncryptionPaddings(new String[] {"NoPadding"})).setRandomizedEncryptionRequired(1).build();
                    String v4_14 = javax.crypto.KeyGenerator.getInstance("AES", "AndroidKeyStore");
                    v4_14.init(v8_17);
                    try {
                        v8_14 = v4_14.generateKey();
                    } catch (String v8_18) {
                        com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "unexpected exception while generating key.", v8_18);
                        v8_14 = 0;
                    }
                }
                if (v8_14 == null) {
                    return 0;
                } else {
                    if (p7 == 4) {
                        javax.crypto.spec.IvParameterSpec v0_9 = ark>com.sophos.jbase.iark>.j();
                        if (v0_9 != null) {
                            v2_3.init(p7, v8_14, v0_9);
                        } else {
                            com.sophos.smsec.core.smsectrace.d.c("JBKeyStore", "no stored IV, cipher not initialized yet.");
                            return 0;
                        }
                    } else {
                        if (p7 != 2) {
                            v2_3.init(p7, v8_14);
                        } else {
                        }
                    }
                    ark>com.sophos.jbase.iark>.k[v3] = v2_3;
                    ark>com.sophos.jbase.iark>.l = 0;
                    return v2_3;
                }
            } else {
                return 0;
            }
        }
    }

Method com.sophos.jbase.b.a() calling method javax.crypto.Cipher.getInstance()


    protected varargs Integer a(Void[] p14)
    {
        Integer v14_6 = ark>com.sophos.jbase.bark>.a(this.a);
        int v0 = 0;
        if (v14_6 == null) {
            v0 = -1;
        } else {
            this.e = v14_6.getElementsByTagName("Block");
            if (this.e.getLength() >= 0) {
                com.sophos.jbase.i.b(1);
                com.sophos.jbase.i.g();
            }
            Integer v14_5 = 0;
            while (v14_5 < this.e.getLength()) {
                int v2_5 = ((org.w3c.dom.Element) this.e.item(v14_5));
                if ((!v2_5.hasAttribute("type")) || (!v2_5.getAttribute("type").equals("startBlock"))) {
                    v14_5++;
                } else {
                    Integer v14_8 = this.a(v2_5, "SEK");
                    if (v14_8 != null) {
                        Integer v14_9 = this.b(v14_8, "BValue");
                        try {
                            int v5_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
                            v5_1.init(2, this.c);
                            Integer v14_12 = this.a(v5_1.doFinal(android.util.Base64.decode(v14_9, 3)), this.b(v2_5, "Name"), this.b(v2_5, "NameGID"), 5246976);
                        } catch (Integer v14_13) {
                            com.sophos.smsec.core.smsectrace.d.b("AsyncParseKeyFile", "", v14_13);
                            v14_12 = 0;
                        }
                        if (v14_12 != null) {
                            this.a(v2_5, v14_12, 131072, 1);
                            this.a(v2_5, v14_12);
                            org.w3c.dom.NodeList v1_3 = this.a(v2_5, "Groups");
                            if (v1_3 != null) {
                                org.w3c.dom.NodeList v1_4 = v1_3.getChildNodes();
                                int v2_0 = 0;
                                while (v2_0 < v1_4.getLength()) {
                                    org.w3c.dom.Element v6_9 = ((org.w3c.dom.Element) v1_4.item(v2_0));
                                    if ("G".equals(v6_9.getNodeName())) {
                                        com.sophos.jbase.EncryptionKey v7_5 = this.a(android.util.Base64.decode(this.b(v6_9, "SEK"), 3), v14_12, this.b(v6_9, "Name"), this.b(v6_9, "NameGID"), 1056768);
                                        if (v7_5 != null) {
                                            this.a(this.a(this.b(v6_9, "NameGID"), "group"), v7_5, 8192, 0);
                                        } else {
                                            return Integer.valueOf(12);
                                        }
                                    }
                                    v2_0++;
                                }
                            }
                        } else {
                            return Integer.valueOf(12);
                        }
                    }
                    Integer v14_15 = this.b;
                    if (v14_15 == null) {
                        break;
                    }
                    v14_15.a(0);
                    break;
                }
            }
        }
        return Integer.valueOf(v0);
    }

Method com.sophos.jbase.PKCS5.a() calling method javax.crypto.Cipher.getInstance()


    private int a(byte[] p7)
    {
        byte[] v0_1 = new byte[p7.length];
        String v1_4 = this.b();
        int v2_1 = 0;
        try {
            javax.crypto.Cipher v3_1 = javax.crypto.Cipher.getInstance("AES/ECB/NoPadding");
            v3_1.init(2, new javax.crypto.spec.SecretKeySpec(v1_4, "AES"));
            v3_1.doFinal(p7, 0, p7.length, v0_1);
            v3_1.doFinal(v0_1, 0, p7.length, p7);
        } catch (Exception v7_1) {
            com.sophos.smsec.core.smsectrace.d.b("PKCS5", "", v7_1);
            v2_1 = 4;
        }
        com.sophos.jbase.l.a(v0_1);
        return v2_1;
    }

Method com.sophos.jbase.JBKey.setCipherInstance() calling method javax.crypto.Cipher.getInstance()


    public void setCipherInstance(String p3)
    {
        try {
            this.a = javax.crypto.Cipher.getInstance(p3);
            return;
        } catch (java.security.NoSuchAlgorithmException) {
            throw new com.sophos.jbase.JBException(11, "NoSuchAlgorithmException");
        } catch (javax.crypto.NoSuchPaddingException) {
            throw new com.sophos.jbase.JBException(11, "NoSuchPaddingException");
        }
    }

Method com.sophos.jbase.JBKey.initCipher() calling method javax.crypto.Cipher.getInstance()


    public void initCipher(int p3, byte[] p4, String p5)
    {
        try {
            if ((this.a == null) || (!p5.equals(this.a.getAlgorithm()))) {
                this.a = javax.crypto.Cipher.getInstance(p5);
            }
        } catch (com.sophos.jbase.JBException v3_10) {
            String v5_10 = new StringBuilder();
            v5_10.append("InvalidKeyException: ");
            v5_10.append(v3_10.getMessage());
            throw new com.sophos.jbase.JBException(12, v5_10.toString());
        } catch (com.sophos.jbase.JBException v3_7) {
            String v5_8 = new StringBuilder();
            v5_8.append("InvalidAlgorithmParameterException: ");
            v5_8.append(v3_7.getMessage());
            throw new com.sophos.jbase.JBException(12, v5_8.toString());
        }
        if (p4 == null) {
            this.a.init(p3, this.mKeySpec);
        } else {
            this.a.init(p3, this.mKeySpec, new javax.crypto.spec.IvParameterSpec(p4));
        }
        return;
    }

Method com.sophos.jbase.JBKey.keyFromSecret() calling method javax.crypto.Cipher.getInstance()


    public static com.sophos.jbase.JBKey keyFromSecret(byte[] p3, com.sophos.jbase.JBKey$JBCryptAlgorithm p4, com.sophos.jbase.JBKey$JBKeySize p5)
    {
        if ((p3 != null) && (p3.length != 0)) {
            java.security.NoSuchAlgorithmException v3_1 = com.sophos.jbase.h.c(p3);
        } else {
            v3_1 = com.sophos.jbase.h.c("SECRETKEY".getBytes(com.sophos.jbase.JBKey.UTF8));
        }
        byte[] v0_2 = new byte[v3_1.length];
        if (!com.sophos.jbase.PKCS5.a("SECRETKEY", v3_1, v0_2)) {
            com.sophos.smsec.core.smsectrace.d.d("JBASE", "Unexpected error");
        }
        com.sophos.jbase.JBKey v1_4 = new com.sophos.jbase.JBKey(v0_2, p4, p5);
        com.sophos.jbase.l.a(v3_1);
        com.sophos.jbase.l.a(v0_2);
        try {
            v1_4.a = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
        } catch (java.security.NoSuchAlgorithmException v3_4) {
            com.sophos.smsec.core.smsectrace.d.c("JBASE", "Unexpected error", v3_4);
        }
        return v1_4;
    }

Method com.sophos.cloud.core.c.h.a() calling method javax.crypto.Cipher.getInstance()


    public static byte[] a(byte[] p2, java.security.PrivateKey p3)
    {
        try {
            int v2_3 = java.security.MessageDigest.getInstance("SHA-256").digest(p2);
            javax.crypto.Cipher v0_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
            v0_3.init(1, p3);
            return v0_3.doFinal(v2_3);
        } catch (java.security.NoSuchAlgorithmException) {
            return 0;
        }
    }

Method com.nimbusds.jose.crypto.k.a() calling method javax.crypto.Cipher.getInstance()


    public static javax.crypto.Cipher a(String p0, java.security.Provider p1)
    {
        if (p1 != null) {
            return javax.crypto.Cipher.getInstance(p0, p1);
        } else {
            return javax.crypto.Cipher.getInstance(p0);
        }
    }

Method com.nimbusds.jose.crypto.f.a() calling method javax.crypto.Cipher.getInstance()


    public static byte[] a(javax.crypto.SecretKey p1, javax.crypto.SecretKey p2, java.security.Provider p3)
    {
        try {
            String v3_4;
            if (p3 == null) {
                v3_4 = javax.crypto.Cipher.getInstance("AESWrap");
            } else {
                v3_4 = javax.crypto.Cipher.getInstance("AESWrap", p3);
            }
        } catch (byte[] v1_2) {
            String v3_2 = new StringBuilder("Couldn\'t wrap AES key: ");
            v3_2.append(v1_2.getMessage());
            throw new com.nimbusds.jose.JOSEException(v3_2.toString(), v1_2);
        }
        v3_4.init(3, p2);
        return v3_4.wrap(p1);
    }

Method com.nimbusds.jose.crypto.d.a() calling method javax.crypto.Cipher.getInstance()


    public static com.nimbusds.jose.crypto.h a(javax.crypto.SecretKey p4, com.nimbusds.jose.util.e p5, byte[] p6, byte[] p7, java.security.Provider p8)
    {
        javax.crypto.Cipher v8_1;
        javax.crypto.IllegalBlockSizeException v4_1 = com.nimbusds.jose.util.j.a(p4);
        int v0_1 = ((byte[]) p5.a());
        try {
            if (p8 == null) {
                v8_1 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
            } else {
                v8_1 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p8);
            }
        } catch (javax.crypto.IllegalBlockSizeException v4_3) {
            String v6_2 = new StringBuilder("Couldn\'t create AES/GCM/NoPadding cipher: ");
            v6_2.append(v4_3.getMessage());
            throw new com.nimbusds.jose.JOSEException(v6_2.toString(), v4_3);
        } catch (NoClassDefFoundError) {
            return com.nimbusds.jose.crypto.p.a(v4_1, v0_1, p6, p7);
        }
        v8_1.init(1, v4_1, new javax.crypto.spec.GCMParameterSpec(128, v0_1));
        v8_1.updateAAD(p7);
        try {
            javax.crypto.IllegalBlockSizeException v4_4 = v8_1.doFinal(p6);
            String v6_5 = (v4_4.length - com.nimbusds.jose.util.d.c(128));
            String v7_5 = com.nimbusds.jose.util.d.a(v4_4, 0, v6_5);
            javax.crypto.IllegalBlockSizeException v4_5 = com.nimbusds.jose.util.d.a(v4_4, v6_5, com.nimbusds.jose.util.d.c(128));
            p5.a(ark>com.nimbusds.jose.crypto.dark>.a(v8_1));
            return new com.nimbusds.jose.crypto.h(v7_5, v4_5);
        } catch (javax.crypto.IllegalBlockSizeException v4_6) {
            String v6_8 = new StringBuilder("Couldn\'t encrypt with AES/GCM/NoPadding: ");
            v6_8.append(v4_6.getMessage());
            throw new com.nimbusds.jose.JOSEException(v6_8.toString(), v4_6);
        }
    }

Method com.microsoft.aad.adal.StorageHelper.encrypt() calling method javax.crypto.Cipher.getInstance()


    public String encrypt(String p8)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v2_1 = new StringBuilder();
            v2_1.append("Encrypt version:");
            v2_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v2_1.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_5 = new byte[16];
            this.mRandom.nextBytes(v1_5);
            byte[] v2_5 = new javax.crypto.spec.IvParameterSpec(v1_5);
            byte[] v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_3.init(1, this.mKey, v2_5);
            IllegalArgumentException v8_3 = v3_3.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_5);
            byte[] v2_7 = v4_1.doFinal();
            byte[] v3_8 = new byte[(((v0_6.length + v8_3.length) + v1_5.length) + v2_7.length)];
            System.arraycopy(v0_6, 0, v3_8, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_8, v0_6.length, v8_3.length);
            System.arraycopy(v1_5, 0, v3_8, (v0_6.length + v8_3.length), v1_5.length);
            System.arraycopy(v2_7, 0, v3_8, ((v0_6.length + v8_3.length) + v1_5.length), v2_7.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_8, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.aad.adal.StorageHelper.decrypt() calling method javax.crypto.Cipher.getInstance()


    public String decrypt(String p12)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Starting decryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_8 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_8, 0, 4, "UTF_8");
                    int v6_1 = new StringBuilder();
                    v6_1.append("Encrypt version:");
                    v6_1.append(v1_9);
                    com.microsoft.aad.adal.Logger.i("StorageHelper:decrypt", "", v6_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_3 = ((v12_8.length - 16) - 32);
                    int v7_2 = (v12_8.length - 32);
                    int v8 = (v5_3 - 4);
                    if ((v5_3 < 0) || ((v7_2 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_8, 0, v7_2);
                        this.assertHMac(v12_8, v7_2, v12_8.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_8, v5_3, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_8, 4, v8), "UTF_8");
                        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method com.microsoft.aad.adal.StorageHelper.wrap() calling method javax.crypto.Cipher.getInstance()


    private byte[] wrap(javax.crypto.SecretKey p4)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper", "Wrap secret key.");
        javax.crypto.Cipher v0_2 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_2.init(3, this.mKeyPair.getPublic());
        return v0_2.wrap(p4);
    }

Method com.microsoft.aad.adal.StorageHelper.unwrap() calling method javax.crypto.Cipher.getInstance()


    private javax.crypto.SecretKey unwrap(byte[] p4)
    {
        java.security.KeyStoreException v0_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_3.init(4, this.mKeyPair.getPrivate());
        try {
            return ((javax.crypto.SecretKey) v0_3.unwrap(p4, "AES", 3));
        } catch (IllegalArgumentException v4_3) {
            throw new java.security.KeyStoreException(v4_3);
        }
    }

Method com.baidu.android.pushservice.j.g.c() calling method javax.crypto.Cipher.getInstance()


    public static byte[] c(byte[] p9, String p10)
    {
        int v10_2 = java.security.KeyFactory.getInstance("RSA").generatePublic(new java.security.spec.X509EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p10.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(1, v10_2);
        int v10_3 = p9.length;
        byte[] v2_4 = new byte[((((v10_3 + 117) - 1) / 117) * 128)];
        int v5 = 0;
        int v6 = 0;
        while (v5 < v10_3) {
            byte[] v7_0 = (v10_3 - v5);
            if (117 < v7_0) {
                v7_0 = 117;
            }
            byte[] v8 = new byte[v7_0];
            System.arraycopy(p9, v5, v8, 0, v7_0);
            v5 += v7_0;
            System.arraycopy(v0_1.doFinal(v8), 0, v2_4, v6, 128);
            v6 += 128;
        }
        return v2_4;
    }

Method com.baidu.android.pushservice.j.g.b() calling method javax.crypto.Cipher.getInstance()


    public static byte[] b(byte[] p2, String p3)
    {
        java.security.PublicKey v3_2 = java.security.KeyFactory.getInstance("RSA").generatePublic(new java.security.spec.X509EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p3.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(1, v3_2);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.g.a() calling method javax.crypto.Cipher.getInstance()


    public static byte[] a(byte[] p2, String p3)
    {
        java.security.PrivateKey v3_2 = java.security.KeyFactory.getInstance("RSA").generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p3.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(2, v3_2);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.e.a() calling method javax.crypto.Cipher.getInstance()


    private static byte[] a(byte[] p2, java.security.PublicKey p3)
    {
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(2, p3);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.a.b() calling method javax.crypto.Cipher.getInstance()


    public static byte[] b(String p2, String p3, byte[] p4)
    {
        if ((!android.text.TextUtils.isEmpty(p2)) && ((!android.text.TextUtils.isEmpty(p3)) && (p4 != null))) {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
            javax.crypto.Cipher v3_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v3_2.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
            return v3_2.doFinal(p4);
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.j.a.a() calling method javax.crypto.Cipher.getInstance()


    public static byte[] a(String p2, String p3, byte[] p4)
    {
        javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
        javax.crypto.Cipher v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
        v3_3.init(1, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
        return v3_3.doFinal(p4);
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder$1.encryptKeyData() calling method javax.crypto.Cipher.getIV()


    public byte[] encryptKeyData(byte[] p4, byte[] p5, int p6, int p7)
    {
        try {
            javax.crypto.Cipher v0_3 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(this.encAlgorithm));
            v1_3.append("/CFB/NoPadding");
            this.c = v0_3.createCipher(v1_3.toString());
            this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(this.encAlgorithm, p4), this.random);
            this.iv = this.c.getIV();
            return this.c.doFinal(p5, p6, p7);
        } catch (java.security.InvalidKeyException v4_8) {
            String v6_8 = new StringBuilder();
            v6_8.append("illegal block size: ");
            v6_8.append(v4_8.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_8);
        } catch (java.security.InvalidKeyException v4_7) {
            String v6_5 = new StringBuilder();
            v6_5.append("bad padding: ");
            v6_5.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_7);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_6);
        }
    }

Method org.spongycastle.operator.jcajce.JceAsymmetricKeyWrapper.generateWrappedKey() calling method javax.crypto.Cipher.doFinal()


    public byte[] generateWrappedKey(org.spongycastle.operator.GenericKey p6)
    {
        String v1_3;
        org.spongycastle.operator.OperatorException v0_5 = this.helper.createAsymmetricWrapper(this.getAlgorithmIdentifier().getAlgorithm(), this.extraMappings);
        String v1_0 = this.helper.createAlgorithmParameters(this.getAlgorithmIdentifier());
        try {
            if (v1_0 == null) {
                v0_5.init(3, this.publicKey, this.random);
                v1_3 = v0_5.wrap(org.spongycastle.operator.jcajce.OperatorUtils.getJceKey(p6));
            } else {
                v0_5.init(3, this.publicKey, v1_0, this.random);
            }
        } catch (java.security.InvalidKeyException) {
            v1_3 = 0;
        }
        if (v1_3 == null) {
            try {
                v0_5.init(1, this.publicKey, this.random);
                v1_3 = v0_5.doFinal(org.spongycastle.operator.jcajce.OperatorUtils.getJceKey(p6).getEncoded());
            } catch (java.security.GeneralSecurityException v6_4) {
                throw new org.spongycastle.operator.OperatorException("unable to encrypt contents key", v6_4);
            } catch (java.security.GeneralSecurityException v6_3) {
                throw new org.spongycastle.operator.OperatorException("unable to encrypt contents key", v6_3);
            }
        }
        return v1_3;
    }

Method org.spongycastle.operator.jcajce.JceAsymmetricKeyUnwrapper.generateUnwrappedKey() calling method javax.crypto.Cipher.doFinal()


    public org.spongycastle.operator.GenericKey generateUnwrappedKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p6, byte[] p7)
    {
        try {
            String v0_6 = this.helper.createAsymmetricWrapper(this.getAlgorithmIdentifier().getAlgorithm(), this.extraMappings);
            int v1_0 = this.helper.createAlgorithmParameters(this.getAlgorithmIdentifier());
            int v3_0 = 0;
            try {
                if (v1_0 == 0) {
                    v0_6.init(4, this.privKey);
                    int v1_5 = v0_6.unwrap(p7, this.helper.getKeyAlgorithmName(p6.getAlgorithm()), 3);
                    try {
                        if (!this.unwrappedKeyMustBeEncodable) {
                            v3_0 = v1_5;
                        } else {
                            try {
                                int v2_5 = v1_5.getEncoded();
                            } catch (Exception) {
                            }
                            if ((v2_5 != 0) && (v2_5.length != 0)) {
                                v3_0 = v1_5;
                            }
                        }
                    } catch (java.security.GeneralSecurityException) {
                        v3_0 = v1_5;
                    } catch (IllegalStateException) {
                        v3_0 = v1_5;
                    } catch (UnsupportedOperationException) {
                        v3_0 = v1_5;
                    } catch (java.security.ProviderException) {
                        v3_0 = v1_5;
                    }
                } else {
                    v0_6.init(4, this.privKey, v1_0);
                }
            } catch (java.security.GeneralSecurityException) {
            } catch (IllegalStateException) {
            } catch (UnsupportedOperationException) {
            } catch (java.security.ProviderException) {
            }
            if (v3_0 == 0) {
                v0_6.init(2, this.privKey);
                v3_0 = new javax.crypto.spec.SecretKeySpec(v0_6.doFinal(p7), p6.getAlgorithm().getId());
            }
            return new org.spongycastle.operator.jcajce.JceGenericKey(p6, v3_0);
        } catch (javax.crypto.BadPaddingException v6_3) {
            String v0_11 = new StringBuilder();
            v0_11.append("key invalid: ");
            v0_11.append(v6_3.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_11.toString(), v6_3);
        } catch (javax.crypto.BadPaddingException v6_2) {
            String v0_8 = new StringBuilder();
            v0_8.append("illegal blocksize: ");
            v0_8.append(v6_2.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_8.toString(), v6_2);
        } catch (javax.crypto.BadPaddingException v6_1) {
            String v0_4 = new StringBuilder();
            v0_4.append("bad padding: ");
            v0_4.append(v6_1.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_4.toString(), v6_1);
        }
    }

Method com.sophos.smsec.plugin.appprotection.gui.blocking.AuthorizeFingerPrintDialog.c() calling method javax.crypto.Cipher.doFinal()


    private boolean c()
    {
        try {
            this.f.doFinal("smsec_fingerprint_message".getBytes(java.nio.charset.StandardCharsets.UTF_8));
            return 1;
        } catch (int v0_5) {
            StringBuilder v2_1 = new StringBuilder();
            v2_1.append("Failed to encrypt the data with the generated key.");
            v2_1.append(v0_5.getMessage());
            com.sophos.smsec.core.smsectrace.d.d("AP_FINGERPRINT", v2_1.toString());
            return 0;
        }
    }

Method com.sophos.keepasseditor.ui.dialogs.PasswordEnterDialogFragment.d() calling method javax.crypto.Cipher.doFinal()


    private boolean d()
    {
        try {
            this.j.doFinal("keepass_fingerprint_message".getBytes());
            return 1;
        } catch (int v0_5) {
            StringBuilder v2_0 = new StringBuilder();
            v2_0.append("Failed to encrypt the data with the generated key.");
            v2_0.append(v0_5.getMessage());
            com.sophos.smsec.core.smsectrace.d.d("PasswordEnterDialogFrag", v2_0.toString());
            return 0;
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo() calling method javax.crypto.Cipher.doFinal()


    protected byte[] encryptSessionInfo(org.spongycastle.openpgp.PGPPublicKey p10, byte[] p11)
    {
        try {
            if (p10.getAlgorithm() != 18) {
                javax.crypto.Cipher v0_30 = this.helper.createPublicKeyCipher(p10.getAlgorithm());
                v0_30.init(1, this.keyConverter.getPublicKey(p10), this.random);
                return v0_30.doFinal(p11);
            } else {
                javax.crypto.Cipher v0_26 = ((org.spongycastle.bcpg.ECDHPublicBCPGKey) p10.getPublicKeyPacket().getKey());
                java.security.SecureRandom v1_21 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getX9Parameters(v0_26.getCurveOID());
                byte v3_3 = this.helper.createAlgorithmParameters("EC");
                v3_3.init(new org.spongycastle.asn1.x9.X962Parameters(v0_26.getCurveOID()).getEncoded());
                javax.crypto.spec.SecretKeySpec v4_5 = this.helper.createKeyPairGenerator("EC");
                v4_5.initialize(v3_3.getParameterSpec(java.security.spec.AlgorithmParameterSpec));
                byte v3_5 = v4_5.generateKeyPair();
                javax.crypto.spec.SecretKeySpec v4_7 = this.helper.createKeyAgreement(org.spongycastle.openpgp.operator.RFC6637Utils.getAgreementAlgorithm(p10.getPublicKeyPacket()));
                v4_7.init(v3_5.getPrivate(), new org.spongycastle.jcajce.spec.UserKeyingMaterialSpec(org.spongycastle.openpgp.operator.RFC6637Utils.createUserKeyingMaterial(p10.getPublicKeyPacket(), new org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator())));
                v4_7.doPhase(this.keyConverter.getPublicKey(p10), 1);
                byte[] v10_12 = v4_7.generateSecret(org.spongycastle.openpgp.operator.RFC6637Utils.getKeyEncryptionOID(v0_26.getSymmetricKeyAlgorithm()).getId());
                javax.crypto.Cipher v0_29 = this.helper.createKeyWrapper(v0_26.getSymmetricKeyAlgorithm());
                v0_29.init(3, v10_12, this.random);
                byte[] v10_14 = v0_29.wrap(new javax.crypto.spec.SecretKeySpec(org.spongycastle.openpgp.operator.PGPPad.padSessionData(p11), org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p11[0])));
                int v11_6 = new org.spongycastle.bcpg.MPInteger(new java.math.BigInteger(1, new org.spongycastle.asn1.x9.X9ECPoint(v1_21.getCurve(), org.spongycastle.asn1.x509.SubjectPublicKeyInfo.getInstance(v3_5.getPublic().getEncoded()).getPublicKeyData().getBytes()).getPoint().getEncoded(0))).getEncoded();
                javax.crypto.Cipher v0_8 = new byte[((v11_6.length + 1) + v10_14.length)];
                System.arraycopy(v11_6, 0, v0_8, 0, v11_6.length);
                v0_8[v11_6.length] = ((byte) v10_14.length);
                System.arraycopy(v10_14, 0, v0_8, (v11_6.length + 1), v10_14.length);
                return v0_8;
            }
        } catch (byte[] v10_7) {
            javax.crypto.Cipher v0_23 = new StringBuilder();
            v0_23.append("illegal block size: ");
            v0_23.append(v10_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_23.toString(), v10_7);
        } catch (byte[] v10_6) {
            javax.crypto.Cipher v0_19 = new StringBuilder();
            v0_19.append("bad padding: ");
            v0_19.append(v10_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_19.toString(), v10_6);
        } catch (byte[] v10_5) {
            javax.crypto.Cipher v0_16 = new StringBuilder();
            v0_16.append("key invalid: ");
            v0_16.append(v10_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_16.toString(), v10_5);
        } catch (byte[] v10_3) {
            javax.crypto.Cipher v0_13 = new StringBuilder();
            v0_13.append("unable to encode MPI: ");
            v0_13.append(v10_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_13.toString(), v10_3);
        } catch (byte[] v10_2) {
            javax.crypto.Cipher v0_10 = new StringBuilder();
            v0_10.append("unable to set up ephemeral keys: ");
            v0_10.append(v10_2.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_10.toString(), v10_2);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator.encryptSessionInfo() calling method javax.crypto.Cipher.doFinal()


    protected byte[] encryptSessionInfo(int p4, byte[] p5, byte[] p6)
    {
        try {
            String v0_0 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
            javax.crypto.spec.SecretKeySpec v1_2 = this.helper;
            byte[] v2_3 = new StringBuilder();
            v2_3.append(v0_0);
            v2_3.append("/CFB/NoPadding");
            String v0_1 = v1_2.createCipher(v2_3.toString());
            byte[] v2_1 = new byte[v0_1.getBlockSize()];
            v0_1.init(1, new javax.crypto.spec.SecretKeySpec(p5, org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4)), new javax.crypto.spec.IvParameterSpec(v2_1));
            return v0_1.doFinal(p6, 0, p6.length);
        } catch (java.security.InvalidKeyException v4_8) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_8.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_8);
        } catch (java.security.InvalidKeyException v4_7) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_7);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_5 = new StringBuilder();
            v6_5.append("IV invalid: ");
            v6_5.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_2 = new StringBuilder();
            v6_2.append("key invalid: ");
            v6_2.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_5);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder$1.recoverSessionData() calling method javax.crypto.Cipher.doFinal()


    public byte[] recoverSessionData(int p4, byte[] p5, byte[] p6)
    {
        try {
            if ((p6 == null) || (p6.length <= 0)) {
                String v6_4 = new byte[(p5.length + 1)];
                v6_4[0] = ((byte) p4);
                System.arraycopy(p5, 0, v6_4, 1, p5.length);
                return v6_4;
            } else {
                byte[] v4_2 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
                javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder.access$000(this.this$0);
                int v1_1 = new StringBuilder();
                v1_1.append(v4_2);
                v1_1.append("/CFB/NoPadding");
                javax.crypto.Cipher v0_3 = v0_2.createCipher(v1_1.toString());
                byte[] v5_2 = new byte[v0_3.getBlockSize()];
                v0_3.init(2, new javax.crypto.spec.SecretKeySpec(p5, v4_2), new javax.crypto.spec.IvParameterSpec(v5_2));
                return v0_3.doFinal(p6);
            }
        } catch (byte[] v4_6) {
            throw new org.spongycastle.openpgp.PGPException("Exception recovering session info", v4_6);
        }
    }

Method com.sophos.smsdkex.communication.rest.KeyRingAuthCommandHandler.buildJson() calling method javax.crypto.Cipher.doFinal()


    public org.json.JSONObject buildJson()
    {
        org.json.JSONObject v0 = super.buildJson();
        android.content.Context v1_1 = new org.json.JSONObject();
        v1_1.put("user", this.mUser);
        String v2_0 = com.sophos.smsdkex.communication.SdkPreferences.getSgnKeyringSecret(this.getContext());
        try {
            String v3_2 = new com.sophos.jsceplib.d(this.getContext(), this.loadRestConfig().getCertificateSubjectCn(), this.loadRestConfig().getCertificateSubjectO(), this.loadRestConfig().getUniqueAppId()).a();
            String v6_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
            v6_3.init(2, v3_2);
            String v2_4 = v6_3.doFinal(android.util.Base64.decode(v2_0.getBytes(java.nio.charset.Charset.defaultCharset()), 2));
        } catch (String v2_6) {
            com.sophos.smsec.core.smsectrace.d.c("REST", "", v2_6);
            v2_4 = 0;
        } catch (String v2_5) {
            com.sophos.smsec.core.smsectrace.d.c("REST", "generic runtime exception during decryption.", v2_5);
            v2_4 = 0;
        }
        if (v2_4 != null) {
            String v3_8 = new com.sophos.jbase.JBKey(v2_4, com.sophos.jbase.JBKey$JBCryptAlgorithm.JBAES, com.sophos.jbase.JBKey$JBKeySize.JBKeySize256);
            String v2_8 = new byte[32];
            com.sophos.jbase.k.a(v2_8);
            String v2_9 = com.sophos.jbase.JBKey.getIvFromData(v2_8);
            try {
                v3_8.initCipher(1, v2_9);
                v1_1.put("password", android.util.Base64.encodeToString(com.sophos.jbase.c.b(this.mPassword.getBytes(), 0, this.mPassword.getBytes(java.nio.charset.Charset.defaultCharset()).length, v3_8, v2_9), 2));
            } catch (String v3_11) {
                com.sophos.smsec.core.smsectrace.d.b("REST", "", v3_11);
            }
            v1_1.put("passwordInitVector", android.util.Base64.encodeToString(v2_9, 2));
            v0.put("auth_data", v1_1);
        } else {
            com.sophos.smsec.core.smsectrace.d.h("decryption error.");
        }
        com.sophos.smsdkex.communication.SdkPreferences.setSgnKeyringSecret(this.getContext(), 0);
        return v0;
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder$1.encryptKeyData() calling method javax.crypto.Cipher.doFinal()


    public byte[] encryptKeyData(byte[] p4, byte[] p5, byte[] p6, int p7, int p8)
    {
        try {
            javax.crypto.Cipher v0_3 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(this.encAlgorithm));
            v1_3.append("/CFB/NoPadding");
            this.c = v0_3.createCipher(v1_3.toString());
            this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(this.encAlgorithm, p4), new javax.crypto.spec.IvParameterSpec(p5));
            this.iv = p5;
            return this.c.doFinal(p6, p7, p8);
        } catch (java.security.InvalidAlgorithmParameterException v4_7) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_7);
        } catch (java.security.InvalidAlgorithmParameterException v4_6) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_6);
        } catch (java.security.InvalidAlgorithmParameterException v4_5) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid key: ");
            v6_5.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_5);
        } catch (java.security.InvalidAlgorithmParameterException v4_4) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid iv: ");
            v6_2.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_4);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder$1.encryptKeyData() calling method javax.crypto.Cipher.doFinal()


    public byte[] encryptKeyData(byte[] p4, byte[] p5, int p6, int p7)
    {
        try {
            javax.crypto.Cipher v0_3 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(this.encAlgorithm));
            v1_3.append("/CFB/NoPadding");
            this.c = v0_3.createCipher(v1_3.toString());
            this.c.init(1, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(this.encAlgorithm, p4), this.random);
            this.iv = this.c.getIV();
            return this.c.doFinal(p5, p6, p7);
        } catch (java.security.InvalidKeyException v4_8) {
            String v6_8 = new StringBuilder();
            v6_8.append("illegal block size: ");
            v6_8.append(v4_8.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_8);
        } catch (java.security.InvalidKeyException v4_7) {
            String v6_5 = new StringBuilder();
            v6_5.append("bad padding: ");
            v6_5.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_7);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_6);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder$1.recoverKeyData() calling method javax.crypto.Cipher.doFinal()


    public byte[] recoverKeyData(int p4, byte[] p5, byte[] p6, byte[] p7, int p8, int p9)
    {
        try {
            javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            v1_3.append("/CFB/NoPadding");
            javax.crypto.Cipher v0_1 = v0_2.createCipher(v1_3.toString());
            v0_1.init(2, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(p4, p5), new javax.crypto.spec.IvParameterSpec(p6));
            return v0_1.doFinal(p7, p8, p9);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_5);
        } catch (java.security.InvalidKeyException v4_4) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid parameter: ");
            v6_5.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_4);
        } catch (java.security.InvalidKeyException v4_3) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_3);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEProtectionRemoverFactory$1.recoverKeyData() calling method javax.crypto.Cipher.doFinal()


    public byte[] recoverKeyData(int p4, byte[] p5, byte[] p6, byte[] p7, int p8, int p9)
    {
        try {
            javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBEProtectionRemoverFactory.access$000(this.this$0);
            int v1_3 = new StringBuilder();
            v1_3.append(org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            v1_3.append("/CBC/NoPadding");
            javax.crypto.Cipher v0_1 = v0_2.createCipher(v1_3.toString());
            v0_1.init(2, org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey(p4, p5), new javax.crypto.spec.IvParameterSpec(p6));
            return v0_1.doFinal(p7, p8, p9);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_5);
        } catch (java.security.InvalidKeyException v4_4) {
            String v6_5 = new StringBuilder();
            v6_5.append("invalid parameter: ");
            v6_5.append(v4_4.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_4);
        } catch (java.security.InvalidKeyException v4_3) {
            String v6_2 = new StringBuilder();
            v6_2.append("invalid key: ");
            v6_2.append(v4_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_3);
        }
    }

Method org.spongycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.cryptData() calling method javax.crypto.Cipher.doFinal()


    protected byte[] cryptData(boolean p4, org.spongycastle.asn1.x509.AlgorithmIdentifier p5, char[] p6, boolean p7, byte[] p8)
    {
        String v4_6;
        org.spongycastle.asn1.ASN1ObjectIdentifier v0 = p5.getAlgorithm();
        if (p4 == null) {
            v4_6 = 2;
        } else {
            v4_6 = 1;
        }
        if (!v0.on(org.spongycastle.asn1.pkcs.PKCSObjectIdentifiers.pkcs_12PbeIds)) {
            if (!v0.equals(org.spongycastle.asn1.pkcs.PKCSObjectIdentifiers.id_PBES2)) {
                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.createCipher(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.pkcs.PKCS12PBEParams.getInstance(p5.getParameters());
            new javax.crypto.spec.PBEKeySpec(p6);
            try {
                javax.crypto.spec.PBEParameterSpec v1_3 = new javax.crypto.spec.PBEParameterSpec(v5_7.getIV(), v5_7.getIterations().intValue());
                java.io.IOException v5_11 = new org.spongycastle.jcajce.PKCS12Key(p6, p7);
                StringBuilder v6_5 = this.helper.createCipher(v0.getId());
                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 org.spongycastle.cert.crmf.jcajce.JceAsymmetricValueDecryptorGenerator.extractSecretKey() calling method javax.crypto.Cipher.doFinal()


    private java.security.Key extractSecretKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p4, org.spongycastle.asn1.x509.AlgorithmIdentifier p5, byte[] p6)
    {
        try {
            byte[] v4_6 = this.helper.createCipher(p4.getAlgorithm());
            try {
                v4_6.init(4, this.recipientKey);
                javax.crypto.spec.SecretKeySpec v0_0 = v4_6.unwrap(p6, p5.getAlgorithm().getId(), 3);
            } catch (java.security.GeneralSecurityException) {
            }
            if (v0_0 == null) {
                v4_6.init(2, this.recipientKey);
                v0_0 = new javax.crypto.spec.SecretKeySpec(v4_6.doFinal(p6), p5.getAlgorithm().getId());
            }
            return v0_0;
        } catch (byte[] v4_5) {
            throw new org.spongycastle.cert.crmf.CRMFException("key invalid in message.", v4_5);
        } catch (byte[] v4_4) {
            throw new org.spongycastle.cert.crmf.CRMFException("illegal blocksize in message.", v4_4);
        } catch (byte[] v4_2) {
            throw new org.spongycastle.cert.crmf.CRMFException("bad padding in message.", v4_2);
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.encrypt() calling method javax.crypto.Cipher.doFinal()


    public String encrypt(String p8)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            String v1_2 = new StringBuilder();
            v1_2.append("Encrypt version:");
            v1_2.append(this.mBlobVersion);
            android.util.Log.v("StorageHelper", v1_2.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_7 = new byte[16];
            this.mRandom.nextBytes(v1_7);
            byte[] v2_4 = new javax.crypto.spec.IvParameterSpec(v1_7);
            byte[] v3_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_1.init(1, this.mKey, v2_4);
            IllegalArgumentException v8_3 = v3_1.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_7);
            byte[] v2_6 = v4_1.doFinal();
            byte[] v3_6 = new byte[(((v0_6.length + v8_3.length) + v1_7.length) + v2_6.length)];
            System.arraycopy(v0_6, 0, v3_6, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_6, v0_6.length, v8_3.length);
            System.arraycopy(v1_7, 0, v3_6, (v0_6.length + v8_3.length), v1_7.length);
            System.arraycopy(v2_6, 0, v3_6, ((v0_6.length + v8_3.length) + v1_7.length), v2_6.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_6, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.decrypt() calling method javax.crypto.Cipher.doFinal()


    public String decrypt(String p12)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_7 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_7, 0, 4, "UTF_8");
                    int v5_1 = new StringBuilder();
                    v5_1.append("Encrypt version:");
                    v5_1.append(v1_9);
                    android.util.Log.v("StorageHelper", v5_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_5 = ((v12_7.length - 16) - 32);
                    int v7_1 = (v12_7.length - 32);
                    int v8 = (v5_5 - 4);
                    if ((v5_5 < 0) || ((v7_1 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_7, 0, v7_1);
                        this.assertHMac(v12_7, v7_1, v12_7.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_7, v5_5, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_7, 4, v8), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method org.spongycastle.openssl.jcajce.PEMUtilities.crypt() calling method javax.crypto.Cipher.doFinal()


    static byte[] crypt(boolean p13, org.spongycastle.jcajce.util.JcaJceHelper p14, byte[] p15, char[] p16, String p17, byte[] p18)
    {
        byte[] v3_13 = new javax.crypto.spec.IvParameterSpec(p18);
        int v4_0 = "CBC";
        int v6_2 = "PKCS5Padding";
        if (p17.endsWith("-CFB")) {
            v4_0 = "CFB";
            v6_2 = "NoPadding";
        }
        if ((!p17.endsWith("-ECB")) && ((!"DES-EDE".equals(p17)) && (!"DES-EDE3".equals(p17)))) {
            javax.crypto.spec.RC2ParameterSpec v7_1 = v3_13;
        } else {
            v4_0 = "ECB";
            v7_1 = 0;
        }
        String v9;
        String v8;
        if (!p17.endsWith("-OFB")) {
            v8 = v4_0;
            v9 = v6_2;
        } else {
            v8 = "OFB";
            v9 = "NoPadding";
        }
        String v1_2;
        String v11;
        int v10 = 1;
        if (!p17.startsWith("DES-EDE")) {
            if (!p17.startsWith("DES-")) {
                if (!p17.startsWith("BF-")) {
                    int v6_0 = 128;
                    if (!p17.startsWith("RC2-")) {
                        if (!p17.startsWith("AES-")) {
                            throw new org.spongycastle.openssl.EncryptionException("unknown encryption with private key");
                        } else {
                            byte[] v3_21;
                            v11 = "AES";
                            if (p18.length <= 8) {
                                v3_21 = p18;
                            } else {
                                v3_21 = new byte[8];
                                System.arraycopy(p18, 0, v3_21, 0, 8);
                            }
                            if (!p17.startsWith("AES-128-")) {
                                if (!p17.startsWith("AES-192-")) {
                                    if (!p17.startsWith("AES-256-")) {
                                        throw new org.spongycastle.openssl.EncryptionException("unknown AES encryption with private key");
                                    } else {
                                        v6_0 = 256;
                                    }
                                } else {
                                    v6_0 = 192;
                                }
                            }
                            v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "AES", (v6_0 / 8), v3_21);
                        }
                    } else {
                        v11 = "RC2";
                        if (!p17.startsWith("RC2-40-")) {
                            if (p17.startsWith("RC2-64-")) {
                                v6_0 = 64;
                            }
                        } else {
                            v6_0 = 40;
                        }
                        v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "RC2", (v6_0 / 8), p18);
                        if (v7_1 != null) {
                            v7_1 = new javax.crypto.spec.RC2ParameterSpec(v6_0, p18);
                        } else {
                            v7_1 = new javax.crypto.spec.RC2ParameterSpec(v6_0);
                        }
                    }
                } else {
                    v11 = "Blowfish";
                    v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "Blowfish", 16, p18);
                }
            } else {
                v11 = "DES";
                v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "DES", 8, p18);
            }
        } else {
            v11 = "DESede";
            v1_2 = org.spongycastle.openssl.jcajce.PEMUtilities.getKey(p14, p16, "DESede", 24, p18, (p17.startsWith("DES-EDE3") ^ 1));
        }
        javax.crypto.spec.RC2ParameterSpec v2_7 = new StringBuilder();
        v2_7.append(v11);
        v2_7.append("/");
        v2_7.append(v8);
        v2_7.append("/");
        v2_7.append(v9);
        try {
            org.spongycastle.openssl.EncryptionException v0_0 = p14.createCipher(v2_7.toString());
        } catch (org.spongycastle.openssl.EncryptionException v0_1) {
            throw new org.spongycastle.openssl.EncryptionException("exception using cipher - please check password and data.", v0_1);
        }
        if (!p13) {
            v10 = 2;
        } else {
        }
        if (v7_1 != null) {
            v0_0.init(v10, v1_2, v7_1);
        } else {
            v0_0.init(v10, v1_2);
        }
        return v0_0.doFinal(p15);
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePublicKeyDataDecryptorFactoryBuilder.decryptSessionData() calling method javax.crypto.Cipher.doFinal()


    private byte[] decryptSessionData(int p9, java.security.PrivateKey p10, byte[][] p11)
    {
        javax.crypto.Cipher v0_1 = this.helper.createPublicKeyCipher(p9);
        try {
            v0_1.init(2, p10);
        } catch (int v9_13) {
            throw new org.spongycastle.openpgp.PGPException("error setting asymmetric cipher", v9_13);
        }
        if ((p9 != 2) && (p9 != 1)) {
            int v9_5 = ((((javax.crypto.interfaces.DHKey) p10).getParams().getP().bitLength() + 7) / 8);
            org.spongycastle.openpgp.PGPException v10_3 = new byte[v9_5];
            int v4_0 = p11[0];
            if ((v4_0.length - 2) <= v9_5) {
                System.arraycopy(v4_0, 2, v10_3, (v10_3.length - (v4_0.length - 2)), (v4_0.length - 2));
                v0_1.update(v10_3);
            } else {
                v0_1.update(v4_0, 3, (v4_0.length - 3));
            }
            String v11_1 = p11[1];
            int v3_1 = 0;
            while (v3_1 != v10_3.length) {
                v10_3[v3_1] = 0;
                v3_1++;
            }
            if ((v11_1.length - 2) <= v9_5) {
                System.arraycopy(v11_1, 2, v10_3, (v10_3.length - (v11_1.length - 2)), (v11_1.length - 2));
                v0_1.update(v10_3);
            } else {
                v0_1.update(v11_1, 3, (v11_1.length - 3));
            }
        } else {
            int v9_10 = p11[0];
            v0_1.update(v9_10, 2, (v9_10.length - 2));
        }
        try {
            return v0_1.doFinal();
        } catch (int v9_12) {
            throw new org.spongycastle.openpgp.PGPException("exception decrypting session data", v9_12);
        }
    }

Method org.spongycastle.jcajce.io.CipherOutputStream.close() calling method javax.crypto.Cipher.doFinal()


    public void close()
    {
        try {
            int v0_3 = this.cipher.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) {
                        throw v0_6;
                    } else {
                        return;
                    }
                }
            }
            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.io.CipherInputStream.finaliseCipher() calling method javax.crypto.Cipher.doFinal()


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

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.Cipher.doFinal()


    private static byte[] a(byte[] p3, byte[] p4, byte[] p5, int p6)
    {
        try {
            javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v0_1.init(p6, new javax.crypto.spec.SecretKeySpec(p3, "AES"), new javax.crypto.spec.IvParameterSpec(p4));
            return v0_1.doFinal(p5);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_11) {
            throw new UnsupportedOperationException("The specified algorithm is unknown", v3_11);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_10) {
            throw new UnsupportedOperationException("The specified padding is unknown", v3_10);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_8) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_8);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_6) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_6);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_4) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_4);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_2) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_2);
        }
    }

Method com.sophos.jbase.c.b() calling method javax.crypto.Cipher.doFinal()


    public static byte[] b(byte[] p4, int p5, int p6, com.sophos.jbase.JBKey p7, byte[] p8)
    {
        try {
            if (p8 != null) {
                p7.getKey().init(1, p7.getKeySpec(), new javax.crypto.spec.IvParameterSpec(p8));
            } else {
                p7.getKey().init(1, p7.getKeySpec());
            }
        } catch (java.security.InvalidKeyException) {
            throw new com.sophos.jbase.JBException(12, "InvalidKeyException");
        } catch (java.security.InvalidAlgorithmParameterException) {
            throw new com.sophos.jbase.JBException(12, "InvalidAlgorithmParameterException");
        } catch (javax.crypto.IllegalBlockSizeException) {
            throw new com.sophos.jbase.JBException(12, "IllegalBlockSizeException");
        } catch (javax.crypto.BadPaddingException) {
            throw new com.sophos.jbase.JBException(12, "BadPaddingException");
        }
        return p7.getKey().doFinal(p4, p5, p6);
    }

Method com.sophos.jbase.c.b() calling method javax.crypto.Cipher.doFinal()


    public static byte[] b(com.sophos.jbase.JBKey p18, byte[] p19)
    {
        String v2_1 = new byte[8];
        v2_1 = {-90, -90, -90, -90, -90, -90, -90, -90};
        int v3_3 = 16;
        byte[] v4 = new byte[16];
        int v5_1 = new byte[16];
        byte[] v6_1 = new byte[64];
        int v7_0 = (p19.length / 8);
        if (((v7_0 * 8) != p19.length) || (p19.length < 16)) {
            throw new com.sophos.jbase.JBException(4, "bad keylength");
        } else {
            p18.initCipher(1, 0, "AES/ECB/NoPadding");
            System.arraycopy(p19, 0, v6_1, 0, p19.length);
            int v8_4 = v5_1;
            int v5_0 = 0;
            while (v5_0 < 6) {
                byte[] v12_1 = v8_4;
                int v8_5 = 1;
                while (v8_5 <= v7_0) {
                    System.arraycopy(v2_1, 0, v4, 0, 8);
                    byte[] v12_3 = ((v8_5 - 1) * 8);
                    System.arraycopy(v6_1, v12_3, v4, 8, 8);
                    try {
                        byte[] v13 = p18.getKey().doFinal(v4, 0, v3_3);
                        System.arraycopy(v13, 0, v2_1, 0, 8);
                        int v3_4 = 0;
                    } catch (javax.crypto.IllegalBlockSizeException) {
                        throw new com.sophos.jbase.JBException(v13, "IllegalBlockSizeException");
                    } catch (javax.crypto.BadPaddingException) {
                        throw new com.sophos.jbase.JBException(v13, "BadPaddingException");
                    }
                    while (v3_4 < 8) {
                        v2_1[v3_4] = ((byte) (v2_1[v3_4] ^ ((byte) ((int) (((long) ((v7_0 * v5_0) + v8_5)) >> (56 - (v3_4 * 8)))))));
                        v3_4++;
                        com.sophos.jbase.JBKey v11 = p18;
                    }
                    System.arraycopy(v13, 8, v6_1, v12_3, 8);
                    v8_5++;
                    v12_1 = v13;
                    v3_3 = 16;
                    v11 = p18;
                }
                v5_0++;
                v8_4 = v12_1;
                v3_3 = 16;
                v11 = p18;
            }
            int v3_2 = new byte[(p19.length + 8)];
            System.arraycopy(v2_1, 0, v3_2, 0, 8);
            System.arraycopy(v6_1, 0, v3_2, 8, p19.length);
            com.sophos.jbase.l.a(v2_1);
            com.sophos.jbase.l.a(v8_4);
            com.sophos.jbase.l.a(v6_1);
            return v3_2;
        }
    }

Method com.sophos.jbase.c.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(byte[] p4, int p5, int p6, com.sophos.jbase.JBKey p7, byte[] p8)
    {
        try {
            if (p8 != null) {
                p7.getKey().init(2, p7.getKeySpec(), new javax.crypto.spec.IvParameterSpec(p8));
            } else {
                p7.getKey().init(2, p7.getKeySpec());
            }
        } catch (java.security.InvalidKeyException) {
            throw new com.sophos.jbase.JBException(12, "InvalidKeyException");
        } catch (java.security.InvalidAlgorithmParameterException) {
            throw new com.sophos.jbase.JBException(12, "InvalidAlgorithmParameterException");
        } catch (javax.crypto.IllegalBlockSizeException) {
            throw new com.sophos.jbase.JBException(12, "IllegalBlockSizeException");
        } catch (javax.crypto.BadPaddingException) {
            throw new com.sophos.jbase.JBException(12, "BadPaddingException");
        }
        return p7.getKey().doFinal(p4, p5, p6);
    }

Method com.sophos.jbase.c.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(com.sophos.jbase.JBKey p20, byte[] p21)
    {
        int v2_1 = new byte[8];
        v2_1 = {-90, -90, -90, -90, -90, -90, -90, -90};
        byte[] v4 = new byte[16];
        byte[] v5_4 = new byte[16];
        byte[][] v6_1 = ((byte[][]) reflect.Array.newInstance(byte, new int[] {8, 8})));
        int v8_5 = 1;
        int v7_2 = ((p21.length / 8) - 1);
        if (((v7_2 + 1) * 8) != p21.length) {
            throw new com.sophos.jbase.JBException(4, "bad keylength");
        } else {
            p20.initCipher(2, 0, "AES/ECB/NoPadding");
            byte[] v9_0 = new byte[(v7_2 * 8)];
            int v10_2 = 0;
            System.arraycopy(p21, 0, v4, 0, 8);
            int v11_0 = 1;
            while (v11_0 <= v7_2) {
                System.arraycopy(p21, (v11_0 * 8), v6_1[v11_0], 0, 8);
                v11_0++;
            }
            int v11_2 = v5_4;
            byte[] v5_0 = 5;
            while (v5_0 >= null) {
                byte[] v13_1 = v11_2;
                int v11_3 = v7_2;
                while (v11_3 >= v8_5) {
                    int v15 = 0;
                    while (v15 < 8) {
                        byte[] v19_0 = v9_0;
                        v4[v15] = ((byte) (v4[v15] ^ ((byte) ((int) (((long) ((v7_2 * v5_0) + v11_3)) >> (56 - (v15 * 8)))))));
                        v15++;
                        v9_0 = v19_0;
                    }
                    byte[] v19_2 = v9_0;
                    System.arraycopy(v6_1[v11_3], 0, v4, 8, 8);
                    try {
                        v13_1 = p20.getKey().doFinal(v4, 0, 16);
                        System.arraycopy(v13_1, 0, v4, 0, 8);
                        System.arraycopy(v13_1, 8, v6_1[v11_3], 0, 8);
                        v11_3--;
                        v9_0 = v19_2;
                        v8_5 = 1;
                    } catch (javax.crypto.IllegalBlockSizeException) {
                        throw new com.sophos.jbase.JBException(5, "IllegalBlockSizeException");
                    } catch (javax.crypto.BadPaddingException) {
                        throw new com.sophos.jbase.JBException(5, "BadPaddingException");
                    }
                }
                v5_0--;
                v11_2 = v13_1;
                v8_5 = 1;
            }
            byte[] v19_1 = v9_0;
            byte[] v3_1 = 0;
            while (v3_1 < v2_1.length) {
                if (v4[v3_1] == v2_1[v3_1]) {
                    v3_1++;
                } else {
                    int v18 = 0;
                }
                if (v18 == 0) {
                    throw new com.sophos.jbase.JBException(5, "bad key");
                } else {
                    byte[] v0_4 = 0;
                    while (v0_4 < v7_2) {
                        int v2_4 = (v0_4 + 1);
                        System.arraycopy(v6_1[v2_4], 0, v19_1, (v0_4 * 8), 8);
                        v0_4 = v2_4;
                    }
                    byte[] v5_3 = v19_1;
                    com.sophos.jbase.l.a(v4);
                    com.sophos.jbase.l.a(v11_2);
                    while (v10_2 < 8) {
                        com.sophos.jbase.l.a(v6_1[v10_2]);
                        v10_2++;
                    }
                    return v5_3;
                }
            }
            v18 = 1;
        }
    }

Method com.sophos.jbase.b.a() calling method javax.crypto.Cipher.doFinal()


    protected varargs Integer a(Void[] p14)
    {
        Integer v14_6 = ark>com.sophos.jbase.bark>.a(this.a);
        int v0 = 0;
        if (v14_6 == null) {
            v0 = -1;
        } else {
            this.e = v14_6.getElementsByTagName("Block");
            if (this.e.getLength() >= 0) {
                com.sophos.jbase.i.b(1);
                com.sophos.jbase.i.g();
            }
            Integer v14_5 = 0;
            while (v14_5 < this.e.getLength()) {
                int v2_5 = ((org.w3c.dom.Element) this.e.item(v14_5));
                if ((!v2_5.hasAttribute("type")) || (!v2_5.getAttribute("type").equals("startBlock"))) {
                    v14_5++;
                } else {
                    Integer v14_8 = this.a(v2_5, "SEK");
                    if (v14_8 != null) {
                        Integer v14_9 = this.b(v14_8, "BValue");
                        try {
                            int v5_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1PADDING");
                            v5_1.init(2, this.c);
                            Integer v14_12 = this.a(v5_1.doFinal(android.util.Base64.decode(v14_9, 3)), this.b(v2_5, "Name"), this.b(v2_5, "NameGID"), 5246976);
                        } catch (Integer v14_13) {
                            com.sophos.smsec.core.smsectrace.d.b("AsyncParseKeyFile", "", v14_13);
                            v14_12 = 0;
                        }
                        if (v14_12 != null) {
                            this.a(v2_5, v14_12, 131072, 1);
                            this.a(v2_5, v14_12);
                            org.w3c.dom.NodeList v1_3 = this.a(v2_5, "Groups");
                            if (v1_3 != null) {
                                org.w3c.dom.NodeList v1_4 = v1_3.getChildNodes();
                                int v2_0 = 0;
                                while (v2_0 < v1_4.getLength()) {
                                    org.w3c.dom.Element v6_9 = ((org.w3c.dom.Element) v1_4.item(v2_0));
                                    if ("G".equals(v6_9.getNodeName())) {
                                        com.sophos.jbase.EncryptionKey v7_5 = this.a(android.util.Base64.decode(this.b(v6_9, "SEK"), 3), v14_12, this.b(v6_9, "Name"), this.b(v6_9, "NameGID"), 1056768);
                                        if (v7_5 != null) {
                                            this.a(this.a(this.b(v6_9, "NameGID"), "group"), v7_5, 8192, 0);
                                        } else {
                                            return Integer.valueOf(12);
                                        }
                                    }
                                    v2_0++;
                                }
                            }
                        } else {
                            return Integer.valueOf(12);
                        }
                    }
                    Integer v14_15 = this.b;
                    if (v14_15 == null) {
                        break;
                    }
                    v14_15.a(0);
                    break;
                }
            }
        }
        return Integer.valueOf(v0);
    }

Method com.sophos.jbase.PKCS5.a() calling method javax.crypto.Cipher.doFinal()


    private int a(byte[] p7)
    {
        byte[] v0_1 = new byte[p7.length];
        String v1_4 = this.b();
        int v2_1 = 0;
        try {
            javax.crypto.Cipher v3_1 = javax.crypto.Cipher.getInstance("AES/ECB/NoPadding");
            v3_1.init(2, new javax.crypto.spec.SecretKeySpec(v1_4, "AES"));
            v3_1.doFinal(p7, 0, p7.length, v0_1);
            v3_1.doFinal(v0_1, 0, p7.length, p7);
        } catch (Exception v7_1) {
            com.sophos.smsec.core.smsectrace.d.b("PKCS5", "", v7_1);
            v2_1 = 4;
        }
        com.sophos.jbase.l.a(v0_1);
        return v2_1;
    }

Method com.sophos.cloud.core.c.h.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(byte[] p2, java.security.PrivateKey p3)
    {
        try {
            int v2_3 = java.security.MessageDigest.getInstance("SHA-256").digest(p2);
            javax.crypto.Cipher v0_3 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
            v0_3.init(1, p3);
            return v0_3.doFinal(v2_3);
        } catch (java.security.NoSuchAlgorithmException) {
            return 0;
        }
    }

Method com.nimbusds.jose.crypto.d.a() calling method javax.crypto.Cipher.doFinal()


    public static com.nimbusds.jose.crypto.h a(javax.crypto.SecretKey p4, com.nimbusds.jose.util.e p5, byte[] p6, byte[] p7, java.security.Provider p8)
    {
        javax.crypto.Cipher v8_1;
        javax.crypto.IllegalBlockSizeException v4_1 = com.nimbusds.jose.util.j.a(p4);
        int v0_1 = ((byte[]) p5.a());
        try {
            if (p8 == null) {
                v8_1 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
            } else {
                v8_1 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p8);
            }
        } catch (javax.crypto.IllegalBlockSizeException v4_3) {
            String v6_2 = new StringBuilder("Couldn\'t create AES/GCM/NoPadding cipher: ");
            v6_2.append(v4_3.getMessage());
            throw new com.nimbusds.jose.JOSEException(v6_2.toString(), v4_3);
        } catch (NoClassDefFoundError) {
            return com.nimbusds.jose.crypto.p.a(v4_1, v0_1, p6, p7);
        }
        v8_1.init(1, v4_1, new javax.crypto.spec.GCMParameterSpec(128, v0_1));
        v8_1.updateAAD(p7);
        try {
            javax.crypto.IllegalBlockSizeException v4_4 = v8_1.doFinal(p6);
            String v6_5 = (v4_4.length - com.nimbusds.jose.util.d.c(128));
            String v7_5 = com.nimbusds.jose.util.d.a(v4_4, 0, v6_5);
            javax.crypto.IllegalBlockSizeException v4_5 = com.nimbusds.jose.util.d.a(v4_4, v6_5, com.nimbusds.jose.util.d.c(128));
            p5.a(ark>com.nimbusds.jose.crypto.dark>.a(v8_1));
            return new com.nimbusds.jose.crypto.h(v7_5, v4_5);
        } catch (javax.crypto.IllegalBlockSizeException v4_6) {
            String v6_8 = new StringBuilder("Couldn\'t encrypt with AES/GCM/NoPadding: ");
            v6_8.append(v4_6.getMessage());
            throw new com.nimbusds.jose.JOSEException(v6_8.toString(), v4_6);
        }
    }

Method com.nimbusds.jose.crypto.b.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(javax.crypto.SecretKey p1, byte[] p2, byte[] p3, java.security.Provider p4)
    {
        try {
            return ark>com.nimbusds.jose.crypto.bark>.a(p1, 1, p2, p4).doFinal(p3);
        } catch (Exception v1_3) {
            throw new com.nimbusds.jose.JOSEException(v1_3.getMessage(), v1_3);
        }
    }

Method com.microsoft.aad.adal.StorageHelper.encrypt() calling method javax.crypto.Cipher.doFinal()


    public String encrypt(String p8)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p8)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v2_1 = new StringBuilder();
            v2_1.append("Encrypt version:");
            v2_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v2_1.toString());
            String v0_6 = this.mBlobVersion.getBytes("UTF_8");
            IllegalArgumentException v8_2 = p8.getBytes("UTF_8");
            String v1_5 = new byte[16];
            this.mRandom.nextBytes(v1_5);
            byte[] v2_5 = new javax.crypto.spec.IvParameterSpec(v1_5);
            byte[] v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            int v4_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v3_3.init(1, this.mKey, v2_5);
            IllegalArgumentException v8_3 = v3_3.doFinal(v8_2);
            v4_1.init(this.mHMACKey);
            v4_1.update(v0_6);
            v4_1.update(v8_3);
            v4_1.update(v1_5);
            byte[] v2_7 = v4_1.doFinal();
            byte[] v3_8 = new byte[(((v0_6.length + v8_3.length) + v1_5.length) + v2_7.length)];
            System.arraycopy(v0_6, 0, v3_8, 0, v0_6.length);
            System.arraycopy(v8_3, 0, v3_8, v0_6.length, v8_3.length);
            System.arraycopy(v1_5, 0, v3_8, (v0_6.length + v8_3.length), v1_5.length);
            System.arraycopy(v2_7, 0, v3_8, ((v0_6.length + v8_3.length) + v1_5.length), v2_7.length);
            IllegalArgumentException v8_10 = new String(android.util.Base64.encode(v3_8, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v0_16 = new StringBuilder();
            v0_16.append(this.getEncodeVersionLengthPrefix());
            v0_16.append("E1");
            v0_16.append(v8_10);
            return v0_16.toString();
        }
    }

Method com.microsoft.aad.adal.StorageHelper.decrypt() calling method javax.crypto.Cipher.doFinal()


    public String decrypt(String p12)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Starting decryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p12)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v1_3 = (p12.charAt(0) - 97);
            if (v1_3 <= null) {
                int v2_1 = new Object[1];
                v2_1[0] = Integer.valueOf(v1_3);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v2_1));
            } else {
                String v1_5 = (v1_3 + 1);
                if (!p12.substring(1, v1_5).equals("E1")) {
                    Object[] v3_2 = new Object[2];
                    v3_2[0] = p12;
                    v3_2[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v3_2));
                } else {
                    String v12_8 = android.util.Base64.decode(p12.substring(v1_5), 0);
                    String v1_9 = new String(v12_8, 0, 4, "UTF_8");
                    int v6_1 = new StringBuilder();
                    v6_1.append("Encrypt version:");
                    v6_1.append(v1_9);
                    com.microsoft.aad.adal.Logger.i("StorageHelper:decrypt", "", v6_1.toString());
                    String v1_10 = this.getKey(v1_9);
                    int v2_4 = this.getHMacKey(v1_10);
                    int v5_3 = ((v12_8.length - 16) - 32);
                    int v7_2 = (v12_8.length - 32);
                    int v8 = (v5_3 - 4);
                    if ((v5_3 < 0) || ((v7_2 < 0) || (v8 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v9_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v10_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v10_1.init(v2_4);
                        v10_1.update(v12_8, 0, v7_2);
                        this.assertHMac(v12_8, v7_2, v12_8.length, v10_1.doFinal());
                        v9_1.init(2, v1_10, new javax.crypto.spec.IvParameterSpec(v12_8, v5_3, 16));
                        String v0_11 = new String(v9_1.doFinal(v12_8, 4, v8), "UTF_8");
                        com.microsoft.aad.adal.Logger.v("StorageHelper:decrypt", "Finished decryption");
                        return v0_11;
                    }
                }
            }
        }
    }

Method com.baidu.android.pushservice.j.g.c() calling method javax.crypto.Cipher.doFinal()


    public static byte[] c(byte[] p9, String p10)
    {
        int v10_2 = java.security.KeyFactory.getInstance("RSA").generatePublic(new java.security.spec.X509EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p10.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(1, v10_2);
        int v10_3 = p9.length;
        byte[] v2_4 = new byte[((((v10_3 + 117) - 1) / 117) * 128)];
        int v5 = 0;
        int v6 = 0;
        while (v5 < v10_3) {
            byte[] v7_0 = (v10_3 - v5);
            if (117 < v7_0) {
                v7_0 = 117;
            }
            byte[] v8 = new byte[v7_0];
            System.arraycopy(p9, v5, v8, 0, v7_0);
            v5 += v7_0;
            System.arraycopy(v0_1.doFinal(v8), 0, v2_4, v6, 128);
            v6 += 128;
        }
        return v2_4;
    }

Method com.baidu.android.pushservice.j.g.b() calling method javax.crypto.Cipher.doFinal()


    public static byte[] b(byte[] p2, String p3)
    {
        java.security.PublicKey v3_2 = java.security.KeyFactory.getInstance("RSA").generatePublic(new java.security.spec.X509EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p3.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(1, v3_2);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.g.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(byte[] p2, String p3)
    {
        java.security.PrivateKey v3_2 = java.security.KeyFactory.getInstance("RSA").generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(com.baidu.android.pushservice.j.b.a(p3.getBytes())));
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(2, v3_2);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.e.a() calling method javax.crypto.Cipher.doFinal()


    private static byte[] a(byte[] p2, java.security.PublicKey p3)
    {
        javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding");
        v0_1.init(2, p3);
        return v0_1.doFinal(p2);
    }

Method com.baidu.android.pushservice.j.a.b() calling method javax.crypto.Cipher.doFinal()


    public static byte[] b(String p2, String p3, byte[] p4)
    {
        if ((!android.text.TextUtils.isEmpty(p2)) && ((!android.text.TextUtils.isEmpty(p3)) && (p4 != null))) {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
            javax.crypto.Cipher v3_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v3_2.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
            return v3_2.doFinal(p4);
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.j.a.a() calling method javax.crypto.Cipher.doFinal()


    public static byte[] a(String p2, String p3, byte[] p4)
    {
        javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
        javax.crypto.Cipher v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
        v3_3.init(1, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
        return v3_3.doFinal(p4);
    }

Method org.spongycastle.operator.jcajce.JceAsymmetricKeyUnwrapper.generateUnwrappedKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public org.spongycastle.operator.GenericKey generateUnwrappedKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p6, byte[] p7)
    {
        try {
            String v0_6 = this.helper.createAsymmetricWrapper(this.getAlgorithmIdentifier().getAlgorithm(), this.extraMappings);
            int v1_0 = this.helper.createAlgorithmParameters(this.getAlgorithmIdentifier());
            int v3_0 = 0;
            try {
                if (v1_0 == 0) {
                    v0_6.init(4, this.privKey);
                    int v1_5 = v0_6.unwrap(p7, this.helper.getKeyAlgorithmName(p6.getAlgorithm()), 3);
                    try {
                        if (!this.unwrappedKeyMustBeEncodable) {
                            v3_0 = v1_5;
                        } else {
                            try {
                                int v2_5 = v1_5.getEncoded();
                            } catch (Exception) {
                            }
                            if ((v2_5 != 0) && (v2_5.length != 0)) {
                                v3_0 = v1_5;
                            }
                        }
                    } catch (java.security.GeneralSecurityException) {
                        v3_0 = v1_5;
                    } catch (IllegalStateException) {
                        v3_0 = v1_5;
                    } catch (UnsupportedOperationException) {
                        v3_0 = v1_5;
                    } catch (java.security.ProviderException) {
                        v3_0 = v1_5;
                    }
                } else {
                    v0_6.init(4, this.privKey, v1_0);
                }
            } catch (java.security.GeneralSecurityException) {
            } catch (IllegalStateException) {
            } catch (UnsupportedOperationException) {
            } catch (java.security.ProviderException) {
            }
            if (v3_0 == 0) {
                v0_6.init(2, this.privKey);
                v3_0 = new javax.crypto.spec.SecretKeySpec(v0_6.doFinal(p7), p6.getAlgorithm().getId());
            }
            return new org.spongycastle.operator.jcajce.JceGenericKey(p6, v3_0);
        } catch (javax.crypto.BadPaddingException v6_3) {
            String v0_11 = new StringBuilder();
            v0_11.append("key invalid: ");
            v0_11.append(v6_3.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_11.toString(), v6_3);
        } catch (javax.crypto.BadPaddingException v6_2) {
            String v0_8 = new StringBuilder();
            v0_8.append("illegal blocksize: ");
            v0_8.append(v6_2.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_8.toString(), v6_2);
        } catch (javax.crypto.BadPaddingException v6_1) {
            String v0_4 = new StringBuilder();
            v0_4.append("bad padding: ");
            v0_4.append(v6_1.getMessage());
            throw new org.spongycastle.operator.OperatorException(v0_4.toString(), v6_1);
        }
    }

Method org.spongycastle.operator.jcajce.OperatorUtils.getJceKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    static java.security.Key getJceKey(org.spongycastle.operator.GenericKey p2)
    {
        if (!(p2.getRepresentation() instanceof java.security.Key)) {
            if (!(p2.getRepresentation() instanceof byte[])) {
                throw new IllegalArgumentException("unknown generic key type");
            } else {
                return new javax.crypto.spec.SecretKeySpec(((byte[]) p2.getRepresentation()), "ENC");
            }
        } else {
            return ((java.security.Key) p2.getRepresentation());
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected byte[] encryptSessionInfo(org.spongycastle.openpgp.PGPPublicKey p10, byte[] p11)
    {
        try {
            if (p10.getAlgorithm() != 18) {
                javax.crypto.Cipher v0_30 = this.helper.createPublicKeyCipher(p10.getAlgorithm());
                v0_30.init(1, this.keyConverter.getPublicKey(p10), this.random);
                return v0_30.doFinal(p11);
            } else {
                javax.crypto.Cipher v0_26 = ((org.spongycastle.bcpg.ECDHPublicBCPGKey) p10.getPublicKeyPacket().getKey());
                java.security.SecureRandom v1_21 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getX9Parameters(v0_26.getCurveOID());
                byte v3_3 = this.helper.createAlgorithmParameters("EC");
                v3_3.init(new org.spongycastle.asn1.x9.X962Parameters(v0_26.getCurveOID()).getEncoded());
                javax.crypto.spec.SecretKeySpec v4_5 = this.helper.createKeyPairGenerator("EC");
                v4_5.initialize(v3_3.getParameterSpec(java.security.spec.AlgorithmParameterSpec));
                byte v3_5 = v4_5.generateKeyPair();
                javax.crypto.spec.SecretKeySpec v4_7 = this.helper.createKeyAgreement(org.spongycastle.openpgp.operator.RFC6637Utils.getAgreementAlgorithm(p10.getPublicKeyPacket()));
                v4_7.init(v3_5.getPrivate(), new org.spongycastle.jcajce.spec.UserKeyingMaterialSpec(org.spongycastle.openpgp.operator.RFC6637Utils.createUserKeyingMaterial(p10.getPublicKeyPacket(), new org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator())));
                v4_7.doPhase(this.keyConverter.getPublicKey(p10), 1);
                byte[] v10_12 = v4_7.generateSecret(org.spongycastle.openpgp.operator.RFC6637Utils.getKeyEncryptionOID(v0_26.getSymmetricKeyAlgorithm()).getId());
                javax.crypto.Cipher v0_29 = this.helper.createKeyWrapper(v0_26.getSymmetricKeyAlgorithm());
                v0_29.init(3, v10_12, this.random);
                byte[] v10_14 = v0_29.wrap(new javax.crypto.spec.SecretKeySpec(org.spongycastle.openpgp.operator.PGPPad.padSessionData(p11), org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p11[0])));
                int v11_6 = new org.spongycastle.bcpg.MPInteger(new java.math.BigInteger(1, new org.spongycastle.asn1.x9.X9ECPoint(v1_21.getCurve(), org.spongycastle.asn1.x509.SubjectPublicKeyInfo.getInstance(v3_5.getPublic().getEncoded()).getPublicKeyData().getBytes()).getPoint().getEncoded(0))).getEncoded();
                javax.crypto.Cipher v0_8 = new byte[((v11_6.length + 1) + v10_14.length)];
                System.arraycopy(v11_6, 0, v0_8, 0, v11_6.length);
                v0_8[v11_6.length] = ((byte) v10_14.length);
                System.arraycopy(v10_14, 0, v0_8, (v11_6.length + 1), v10_14.length);
                return v0_8;
            }
        } catch (byte[] v10_7) {
            javax.crypto.Cipher v0_23 = new StringBuilder();
            v0_23.append("illegal block size: ");
            v0_23.append(v10_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_23.toString(), v10_7);
        } catch (byte[] v10_6) {
            javax.crypto.Cipher v0_19 = new StringBuilder();
            v0_19.append("bad padding: ");
            v0_19.append(v10_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_19.toString(), v10_6);
        } catch (byte[] v10_5) {
            javax.crypto.Cipher v0_16 = new StringBuilder();
            v0_16.append("key invalid: ");
            v0_16.append(v10_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_16.toString(), v10_5);
        } catch (byte[] v10_3) {
            javax.crypto.Cipher v0_13 = new StringBuilder();
            v0_13.append("unable to encode MPI: ");
            v0_13.append(v10_3.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_13.toString(), v10_3);
        } catch (byte[] v10_2) {
            javax.crypto.Cipher v0_10 = new StringBuilder();
            v0_10.append("unable to set up ephemeral keys: ");
            v0_10.append(v10_2.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v0_10.toString(), v10_2);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEKeyEncryptionMethodGenerator.encryptSessionInfo() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected byte[] encryptSessionInfo(int p4, byte[] p5, byte[] p6)
    {
        try {
            String v0_0 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
            javax.crypto.spec.SecretKeySpec v1_2 = this.helper;
            byte[] v2_3 = new StringBuilder();
            v2_3.append(v0_0);
            v2_3.append("/CFB/NoPadding");
            String v0_1 = v1_2.createCipher(v2_3.toString());
            byte[] v2_1 = new byte[v0_1.getBlockSize()];
            v0_1.init(1, new javax.crypto.spec.SecretKeySpec(p5, org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4)), new javax.crypto.spec.IvParameterSpec(v2_1));
            return v0_1.doFinal(p6, 0, p6.length);
        } catch (java.security.InvalidKeyException v4_8) {
            String v6_11 = new StringBuilder();
            v6_11.append("illegal block size: ");
            v6_11.append(v4_8.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_11.toString(), v4_8);
        } catch (java.security.InvalidKeyException v4_7) {
            String v6_8 = new StringBuilder();
            v6_8.append("bad padding: ");
            v6_8.append(v4_7.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_8.toString(), v4_7);
        } catch (java.security.InvalidKeyException v4_6) {
            String v6_5 = new StringBuilder();
            v6_5.append("IV invalid: ");
            v6_5.append(v4_6.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_5.toString(), v4_6);
        } catch (java.security.InvalidKeyException v4_5) {
            String v6_2 = new StringBuilder();
            v6_2.append("key invalid: ");
            v6_2.append(v4_5.getMessage());
            throw new org.spongycastle.openpgp.PGPException(v6_2.toString(), v4_5);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder$1.recoverSessionData() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public byte[] recoverSessionData(int p4, byte[] p5, byte[] p6)
    {
        try {
            if ((p6 == null) || (p6.length <= 0)) {
                String v6_4 = new byte[(p5.length + 1)];
                v6_4[0] = ((byte) p4);
                System.arraycopy(p5, 0, v6_4, 1, p5.length);
                return v6_4;
            } else {
                byte[] v4_2 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4);
                javax.crypto.Cipher v0_2 = org.spongycastle.openpgp.operator.jcajce.JcePBEDataDecryptorFactoryBuilder.access$000(this.this$0);
                int v1_1 = new StringBuilder();
                v1_1.append(v4_2);
                v1_1.append("/CFB/NoPadding");
                javax.crypto.Cipher v0_3 = v0_2.createCipher(v1_1.toString());
                byte[] v5_2 = new byte[v0_3.getBlockSize()];
                v0_3.init(2, new javax.crypto.spec.SecretKeySpec(p5, v4_2), new javax.crypto.spec.IvParameterSpec(v5_2));
                return v0_3.doFinal(p6);
            }
        } catch (byte[] v4_6) {
            throw new org.spongycastle.openpgp.PGPException("Exception recovering session info", v4_6);
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.OpenSSLPBKDF$PBKDF.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) {
                throw new java.security.spec.InvalidKeySpecException("missing required salt");
            } else {
                if (((javax.crypto.spec.PBEKeySpec) p4).getIterationCount() <= 0) {
                    javax.crypto.spec.SecretKeySpec v1_1 = new StringBuilder();
                    v1_1.append("positive iteration count required: ");
                    v1_1.append(((javax.crypto.spec.PBEKeySpec) p4).getIterationCount());
                    throw new java.security.spec.InvalidKeySpecException(v1_1.toString());
                } else {
                    if (((javax.crypto.spec.PBEKeySpec) p4).getKeyLength() <= 0) {
                        javax.crypto.spec.SecretKeySpec v1_3 = new StringBuilder();
                        v1_3.append("positive key length required: ");
                        v1_3.append(((javax.crypto.spec.PBEKeySpec) p4).getKeyLength());
                        throw new java.security.spec.InvalidKeySpecException(v1_3.toString());
                    } else {
                        if (((javax.crypto.spec.PBEKeySpec) p4).getPassword().length == 0) {
                            throw new IllegalArgumentException("password empty");
                        } else {
                            String v0_13 = new org.spongycastle.crypto.generators.OpenSSLPBEParametersGenerator();
                            v0_13.init(org.spongycastle.util.Strings.toByteArray(((javax.crypto.spec.PBEKeySpec) p4).getPassword()), ((javax.crypto.spec.PBEKeySpec) p4).getSalt());
                            return new javax.crypto.spec.SecretKeySpec(((org.spongycastle.crypto.params.KeyParameter) v0_13.generateDerivedParameters(((javax.crypto.spec.PBEKeySpec) p4).getKeyLength())).getKey(), "OpenSSLPBKDF");
                        }
                    }
                }
            }
        }
    }

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


    protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey p4, Class p5)
    {
        if (p5 == null) {
            throw new java.security.spec.InvalidKeySpecException("keySpec parameter is null");
        } else {
            if (p4 == null) {
                throw new java.security.spec.InvalidKeySpecException("key parameter is null");
            } else {
                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_4 = p4.getEncoded();
                        try {
                            if (v4_4.length != 16) {
                                return new javax.crypto.spec.DESedeKeySpec(v4_4);
                            } else {
                                javax.crypto.spec.DESedeKeySpec v5_8 = new byte[24];
                                System.arraycopy(v4_4, 0, v5_8, 0, 16);
                                System.arraycopy(v4_4, 0, v5_8, 16, 8);
                                return new javax.crypto.spec.DESedeKeySpec(v5_8);
                            }
                        } catch (javax.crypto.spec.DESedeKeySpec v4_8) {
                            throw new java.security.spec.InvalidKeySpecException(v4_8.toString());
                        }
                    }
                } else {
                    return new javax.crypto.spec.SecretKeySpec(p4.getEncoded(), this.algName);
                }
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.DESede$KeyFactory.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.DES$KeyFactory.engineGetKeySpec() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey p2, Class p3)
    {
        if (p3 == null) {
            throw new java.security.spec.InvalidKeySpecException("keySpec parameter is null");
        } else {
            if (p2 == null) {
                throw new java.security.spec.InvalidKeySpecException("key parameter is null");
            } else {
                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_5) {
                            throw new java.security.spec.InvalidKeySpecException(v2_5.toString());
                        }
                    }
                } else {
                    return new javax.crypto.spec.SecretKeySpec(p2.getEncoded(), this.algName);
                }
            }
        }
    }

Method org.spongycastle.jcajce.provider.symmetric.DES$KeyFactory.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.cms.jcajce.JcePasswordRecipientInfoGenerator.generateEncryptedBytes() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public byte[] generateEncryptedBytes(org.spongycastle.asn1.x509.AlgorithmIdentifier p5, byte[] p6, org.spongycastle.operator.GenericKey p7)
    {
        String v7_1 = this.helper.getJceKey(p7);
        String v0_4 = this.helper.createRFC3211Wrapper(p5.getAlgorithm());
        try {
            v0_4.init(3, new javax.crypto.spec.SecretKeySpec(p6, v0_4.getAlgorithm()), new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(p5.getParameters()).getOctets()));
            return v0_4.wrap(v7_1);
        } catch (java.security.GeneralSecurityException v5_6) {
            String v7_3 = new StringBuilder();
            v7_3.append("cannot process content encryption key: ");
            v7_3.append(v5_6.getMessage());
            throw new org.spongycastle.cms.CMSException(v7_3.toString(), v5_6);
        }
    }

Method org.spongycastle.cms.jcajce.JcePasswordRecipient.extractSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected java.security.Key extractSecretKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p5, org.spongycastle.asn1.x509.AlgorithmIdentifier p6, byte[] p7, byte[] p8)
    {
        javax.crypto.Cipher v0_1 = this.helper.createRFC3211Wrapper(p5.getAlgorithm());
        try {
            v0_1.init(4, new javax.crypto.spec.SecretKeySpec(p7, v0_1.getAlgorithm()), new javax.crypto.spec.IvParameterSpec(org.spongycastle.asn1.ASN1OctetString.getInstance(p5.getParameters()).getOctets()));
            return v0_1.unwrap(p8, p6.getAlgorithm().getId(), 3);
        } catch (java.security.GeneralSecurityException v5_6) {
            String v7_2 = new StringBuilder();
            v7_2.append("cannot process content encryption key: ");
            v7_2.append(v5_6.getMessage());
            throw new org.spongycastle.cms.CMSException(v7_2.toString(), v5_6);
        }
    }

Method com.nimbusds.jose.jwk.OctetSequenceKey.toSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public javax.crypto.SecretKey toSecretKey(String p3)
    {
        return new javax.crypto.spec.SecretKeySpec(this.toByteArray(), p3);
    }

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


    protected java.security.Key engineUnwrap(byte[] p3, String p4, int p5)
    {
        try {
            java.security.InvalidKeyException v3_4 = this.engineDoFinal(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.util.BaseWrapCipher.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.wrapEngine != null) {
                v4_15 = this.wrapEngine.unwrap(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.helper.createKeyFactory(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.pkcs.PrivateKeyInfo.getInstance(v4_15);
                    String v5_17 = org.spongycastle.jce.provider.BouncyCastleProvider.getPrivateKey(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.getPrivateKeyAlgorithm().getAlgorithm());
                    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.jcajce.provider.symmetric.util.BaseSecretKeyFactory.engineTranslateKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


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

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


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

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


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.uninitialised) {
            this.engine.init(new org.spongycastle.crypto.KeyGenerationParameters(new java.security.SecureRandom(), this.defaultKeySize));
            this.uninitialised = 0;
        }
        if (this.keySizeSet) {
            return new javax.crypto.spec.SecretKeySpec(this.engine.generateKey(), this.algName);
        } else {
            javax.crypto.spec.SecretKeySpec v0_5 = this.engine.generateKey();
            System.arraycopy(v0_5, 0, v0_5, 16, 8);
            return new javax.crypto.spec.SecretKeySpec(v0_5, this.algName);
        }
    }

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


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.uninitialised) {
            this.engine.init(new org.spongycastle.crypto.KeyGenerationParameters(new java.security.SecureRandom(), this.defaultKeySize));
            this.uninitialised = 0;
        }
        return new javax.crypto.spec.SecretKeySpec(this.engine.generateKey(), this.algName);
    }

Method org.spongycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi.decodeKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private java.security.Key decodeKey(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.helper.createKeyFactory(v2_1).generatePrivate(v5_16);
                case 1:
                    return this.helper.createKeyFactory(v2_1).generatePublic(v5_16);
                case 2:
                    return this.helper.createSecretKeyFactory(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.asymmetric.dh.KeyAgreementSpi.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


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

Method org.spongycastle.cert.crmf.jcajce.JcePKMACValuesCalculator.calculateMac() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public byte[] calculateMac(byte[] p4, byte[] p5)
    {
        try {
            this.mac.init(new javax.crypto.spec.SecretKeySpec(p4, this.mac.getAlgorithm()));
            return this.mac.doFinal(p5);
        } catch (java.security.GeneralSecurityException v4_1) {
            String v0_2 = new StringBuilder();
            v0_2.append("failure in setup: ");
            v0_2.append(v4_1.getMessage());
            throw new org.spongycastle.cert.crmf.CRMFException(v0_2.toString(), v4_1);
        }
    }

Method org.spongycastle.cert.crmf.jcajce.JceAsymmetricValueDecryptorGenerator.extractSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private java.security.Key extractSecretKey(org.spongycastle.asn1.x509.AlgorithmIdentifier p4, org.spongycastle.asn1.x509.AlgorithmIdentifier p5, byte[] p6)
    {
        try {
            byte[] v4_6 = this.helper.createCipher(p4.getAlgorithm());
            try {
                v4_6.init(4, this.recipientKey);
                javax.crypto.spec.SecretKeySpec v0_0 = v4_6.unwrap(p6, p5.getAlgorithm().getId(), 3);
            } catch (java.security.GeneralSecurityException) {
            }
            if (v0_0 == null) {
                v4_6.init(2, this.recipientKey);
                v0_0 = new javax.crypto.spec.SecretKeySpec(v4_6.doFinal(p6), p5.getAlgorithm().getId());
            }
            return v0_0;
        } catch (byte[] v4_5) {
            throw new org.spongycastle.cert.crmf.CRMFException("key invalid in message.", v4_5);
        } catch (byte[] v4_4) {
            throw new org.spongycastle.cert.crmf.CRMFException("illegal blocksize in message.", v4_4);
        } catch (byte[] v4_2) {
            throw new org.spongycastle.cert.crmf.CRMFException("bad padding in message.", v4_2);
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.getSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private javax.crypto.SecretKey getSecretKey(byte[] p3)
    {
        if (p3 == null) {
            throw new IllegalArgumentException("rawBytes");
        } else {
            return new javax.crypto.spec.SecretKeySpec(p3, "AES");
        }
    }

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.getHMacKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private javax.crypto.SecretKey getHMacKey(javax.crypto.SecretKey p3)
    {
        String v0_0 = p3.getEncoded();
        if (v0_0 == null) {
            return p3;
        } else {
            return new javax.crypto.spec.SecretKeySpec(java.security.MessageDigest.getInstance("SHA256").digest(v0_0), "AES");
        }
    }

Method org.spongycastle.openssl.jcajce.PEMUtilities.getKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private static javax.crypto.SecretKey getKey(org.spongycastle.jcajce.util.JcaJceHelper p3, char[] p4, String p5, int p6, byte[] p7, boolean p8)
    {
        try {
            java.security.GeneralSecurityException v3_1 = p3.createSecretKeyFactory("PBKDF-OpenSSL").generateSecret(new javax.crypto.spec.PBEKeySpec(p4, p7, 1, (p6 * 8))).getEncoded();
        } catch (java.security.GeneralSecurityException v3_2) {
            String v5_2 = new StringBuilder();
            v5_2.append("Unable to create OpenSSL PBDKF: ");
            v5_2.append(v3_2.getMessage());
            throw new org.spongycastle.openssl.PEMException(v5_2.toString(), v3_2);
        }
        if ((p8) && (v3_1.length >= 24)) {
            System.arraycopy(v3_1, 0, v3_1, 16, 8);
        }
        return new javax.crypto.spec.SecretKeySpec(v3_1, p5);
    }

Method org.spongycastle.openssl.jcajce.PEMUtilities.generateSecretKeyForPKCS5Scheme2() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.SecretKey generateSecretKeyForPKCS5Scheme2(org.spongycastle.jcajce.util.JcaJceHelper p2, String p3, char[] p4, byte[] p5, int p6)
    {
        return new javax.crypto.spec.SecretKeySpec(p2.createSecretKeyFactory("PBKDF2with8BIT").generateSecret(new javax.crypto.spec.PBEKeySpec(p4, p5, p6, org.spongycastle.openssl.jcajce.PEMUtilities.getKeySize(p3))).getEncoded(), p3);
    }

Method org.spongycastle.openpgp.operator.jcajce.PGPUtil.makeSymmetricKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.SecretKey makeSymmetricKey(int p2, byte[] p3)
    {
        StringBuilder v0_0 = org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p2);
        if (v0_0 == null) {
            StringBuilder v0_2 = new StringBuilder();
            v0_2.append("unknown symmetric algorithm: ");
            v0_2.append(p2);
            throw new org.spongycastle.openpgp.PGPException(v0_2.toString());
        } else {
            return new javax.crypto.spec.SecretKeySpec(p3, v0_0);
        }
    }

Method org.spongycastle.openpgp.operator.jcajce.OperatorHelper.createDataDecryptor() calling method javax.crypto.spec.SecretKeySpec.<init>()


    org.spongycastle.openpgp.operator.PGPDataDecryptor createDataDecryptor(boolean p3, int p4, byte[] p5)
    {
        try {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p5, org.spongycastle.openpgp.operator.jcajce.PGPUtil.getSymmetricCipherName(p4));
            org.spongycastle.openpgp.PGPException v4_3 = this.createStreamCipher(p4, p3);
        } catch (org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_4) {
            throw v3_4;
        } catch (org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_3) {
            throw new org.spongycastle.openpgp.PGPException("Exception creating cipher", v3_3);
        }
        if (p3 == null) {
            v4_3.init(2, v0_1);
        } else {
            org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1 v3_2 = new byte[v4_3.getBlockSize()];
            v4_3.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(v3_2));
        }
        return new org.spongycastle.openpgp.operator.jcajce.OperatorHelper$1(this, v4_3);
    }

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


    protected javax.crypto.SecretKey engineGenerateKey()
    {
        if (this.uninitialised) {
            this.engine.init(new org.spongycastle.crypto.KeyGenerationParameters(new java.security.SecureRandom(), this.defaultKeySize));
            this.uninitialised = 0;
        }
        return new javax.crypto.spec.SecretKeySpec(this.engine.generateKey(), this.algName);
    }

Method org.spongycastle.jcajce.provider.asymmetric.util.BaseCipherSpi.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.wrapEngine != null) {
                v4_17 = this.wrapEngine.unwrap(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.helper.createKeyFactory(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.pkcs.PrivateKeyInfo.getInstance(v4_17);
                    String v5_1 = org.spongycastle.jce.provider.BouncyCastleProvider.getPrivateKey(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.getPrivateKeyAlgorithm().getAlgorithm());
                    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.asymmetric.util.BaseAgreementSpi.engineGenerateSecret() calling method javax.crypto.spec.SecretKeySpec.<init>()


    protected javax.crypto.SecretKey engineGenerateSecret(String p9)
    {
        javax.crypto.spec.SecretKeySpec v1_2;
        byte[] v0_1 = this.bigIntToBytes(this.result);
        javax.crypto.spec.SecretKeySpec v1_3 = org.spongycastle.util.Strings.toUpperCase(p9);
        if (!org.spongycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.oids.containsKey(v1_3)) {
            v1_2 = p9;
        } else {
            v1_2 = ((org.spongycastle.asn1.ASN1ObjectIdentifier) org.spongycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.oids.get(v1_3)).getId();
        }
        int v2_1 = org.spongycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.getKeySize(v1_2);
        byte[] v3_0 = this.kdf;
        if (v3_0 == 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) {
                byte[] v0_3 = new StringBuilder();
                v0_3.append("unknown algorithm encountered: ");
                v0_3.append(v1_2);
                throw new java.security.NoSuchAlgorithmException(v0_3.toString());
            } else {
                byte[] v5_1 = new byte[(v2_1 / 8)];
                if (!(v3_0 instanceof org.spongycastle.crypto.agreement.kdf.DHKEKGenerator)) {
                    this.kdf.init(new org.spongycastle.crypto.params.KDFParameters(v0_1, this.ukmParameters));
                } else {
                    try {
                        this.kdf.init(new org.spongycastle.crypto.agreement.kdf.DHKDFParameters(new org.spongycastle.asn1.ASN1ObjectIdentifier(v1_2), v2_1, v0_1, this.ukmParameters));
                    } catch (IllegalArgumentException) {
                        byte[] v0_8 = new StringBuilder();
                        v0_8.append("no OID for algorithm: ");
                        v0_8.append(v1_2);
                        throw new java.security.NoSuchAlgorithmException(v0_8.toString());
                    }
                }
                this.kdf.generateBytes(v5_1, 0, v5_1.length);
                v0_1 = v5_1;
            }
        }
        if (org.spongycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.des.containsKey(v1_2)) {
            org.spongycastle.crypto.params.DESParameters.setOddParity(v0_1);
        }
        return new javax.crypto.spec.SecretKeySpec(v0_1, org.spongycastle.jcajce.provider.asymmetric.util.BaseAgreementSpi.getAlgorithm(p9));
    }

Method org.spongycastle.cms.jcajce.EnvelopedDataHelper.getJceKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    java.security.Key getJceKey(org.spongycastle.operator.GenericKey p3)
    {
        if (!(p3.getRepresentation() instanceof java.security.Key)) {
            if (!(p3.getRepresentation() instanceof byte[])) {
                throw new IllegalArgumentException("unknown generic key type");
            } else {
                return new javax.crypto.spec.SecretKeySpec(((byte[]) p3.getRepresentation()), "ENC");
            }
        } else {
            return ((java.security.Key) p3.getRepresentation());
        }
    }

Method org.spongycastle.cms.jcajce.EnvelopedDataHelper.getJceKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public java.security.Key getJceKey(org.spongycastle.asn1.ASN1ObjectIdentifier p2, org.spongycastle.operator.GenericKey p3)
    {
        if (!(p3.getRepresentation() instanceof java.security.Key)) {
            if (!(p3.getRepresentation() instanceof byte[])) {
                throw new IllegalArgumentException("unknown generic key type");
            } else {
                return new javax.crypto.spec.SecretKeySpec(((byte[]) p3.getRepresentation()), this.getBaseCipherName(p2));
            }
        } else {
            return ((java.security.Key) p3.getRepresentation());
        }
    }

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


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

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private static byte[] a(byte[] p3, byte[] p4, byte[] p5, int p6)
    {
        try {
            javax.crypto.Cipher v0_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v0_1.init(p6, new javax.crypto.spec.SecretKeySpec(p3, "AES"), new javax.crypto.spec.IvParameterSpec(p4));
            return v0_1.doFinal(p5);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_11) {
            throw new UnsupportedOperationException("The specified algorithm is unknown", v3_11);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_10) {
            throw new UnsupportedOperationException("The specified padding is unknown", v3_10);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_8) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_8);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_6) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_6);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_4) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_4);
        } catch (de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException v3_2) {
            throw ark>de.slackspace.openkeepass.b.aark>.a(v3_2);
        }
    }

Method de.slackspace.openkeepass.b.a.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static byte[] a(byte[] p11, byte[] p12, long p13)
    {
        if (p11 == 0) {
            throw new IllegalArgumentException("Key must not be null");
        } else {
            if (p12 == null) {
                throw new IllegalArgumentException("Data must not be null");
            } else {
                if (p13 < 1) {
                    throw new IllegalArgumentException("Rounds must be > 1");
                } else {
                    try {
                        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance("AES/ECB/NoPadding");
                        v2_2.init(1, new javax.crypto.spec.SecretKeySpec(p11, "AES"));
                        long v9 = 0;
                    } catch (long v11_10) {
                        throw new UnsupportedOperationException("The specified algorithm is unknown", v11_10);
                    } catch (long v11_9) {
                        throw new UnsupportedOperationException("The specified padding is unknown", v11_9);
                    } catch (long v11_8) {
                        throw new de.slackspace.openkeepass.exception.KeePassDatabaseUnreadableException("The key has the wrong size. Have you installed Java Cryptography Extension (JCE)? Is the master key correct?", v11_8);
                    } catch (long v11_6) {
                        throw new AssertionError(v11_6);
                    }
                    while (v9 < p13) {
                        v2_2.update(p12, 0, 16, p12, 0);
                        v2_2.update(p12, 16, 16, p12, 16);
                        v9++;
                    }
                    return p12;
                }
            }
        }
    }

Method com.sophos.jbase.e.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public e(byte[] p2, com.sophos.jbase.f p3, com.sophos.jbase.g p4)
    {
        this.c = 0;
        this.a = p3;
        this.b = p4;
        this.d = new javax.crypto.spec.SecretKeySpec(p2, "AES");
        this.c = 0;
        return;
    }

Method com.sophos.jbase.PKCS5.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private int a(byte[] p7)
    {
        byte[] v0_1 = new byte[p7.length];
        String v1_4 = this.b();
        int v2_1 = 0;
        try {
            javax.crypto.Cipher v3_1 = javax.crypto.Cipher.getInstance("AES/ECB/NoPadding");
            v3_1.init(2, new javax.crypto.spec.SecretKeySpec(v1_4, "AES"));
            v3_1.doFinal(p7, 0, p7.length, v0_1);
            v3_1.doFinal(v0_1, 0, p7.length, p7);
        } catch (Exception v7_1) {
            com.sophos.smsec.core.smsectrace.d.b("PKCS5", "", v7_1);
            v2_1 = 4;
        }
        com.sophos.jbase.l.a(v0_1);
        return v2_1;
    }

Method com.sophos.jbase.JBKey.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public JBKey(byte[] p1, com.sophos.jbase.JBKey$JBCryptAlgorithm p2, com.sophos.jbase.JBKey$JBKeySize p3)
    {
        this.mAlgorithm = p2;
        this.mSize = p3;
        this.mKeySpec = new javax.crypto.spec.SecretKeySpec(p1, "AES");
        this.a = 0;
        return;
    }

Method com.nimbusds.jose.util.j.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.SecretKey a(javax.crypto.SecretKey p2)
    {
        if (p2 != null) {
            return new javax.crypto.spec.SecretKeySpec(p2.getEncoded(), "AES");
        } else {
            return 0;
        }
    }

Method com.nimbusds.jose.crypto.q.b() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.SecretKey b(javax.crypto.SecretKey p2, com.nimbusds.jose.EncryptionMethod p3, byte[] p4, byte[] p5)
    {
        String v0_1 = new java.io.ByteArrayOutputStream();
        try {
            v0_1.write(com.nimbusds.jose.crypto.q.a);
            java.security.NoSuchAlgorithmException v2_2 = p2.getEncoded();
            v0_1.write(v2_2);
            java.security.NoSuchAlgorithmException v2_6 = (v2_2.length * 8);
            v0_1.write(com.nimbusds.jose.util.h.a(v2_6));
            v0_1.write(p3.toString().getBytes(com.nimbusds.jose.util.k.a));
        } catch (java.security.NoSuchAlgorithmException v2_1) {
            throw new com.nimbusds.jose.JOSEException(v2_1.getMessage(), v2_1);
        }
        if (p4 == null) {
            v0_1.write(com.nimbusds.jose.crypto.q.b);
        } else {
            v0_1.write(com.nimbusds.jose.util.h.a(p4.length));
            v0_1.write(p4);
        }
        if (p5 == null) {
            v0_1.write(com.nimbusds.jose.crypto.q.b);
        } else {
            v0_1.write(com.nimbusds.jose.util.h.a(p5.length));
            v0_1.write(p5);
        }
        v0_1.write(com.nimbusds.jose.crypto.q.d);
        com.nimbusds.jose.JOSEException v3_12 = v0_1.toByteArray();
        try {
            String v4_3 = new StringBuilder("SHA-");
            v4_3.append(v2_6);
            com.nimbusds.jose.JOSEException v3_13 = java.security.MessageDigest.getInstance(v4_3.toString()).digest(v3_12);
            String v4_7 = new StringBuilder("HMACSHA");
            v4_7.append(v2_6);
            return new javax.crypto.spec.SecretKeySpec(v3_13, v4_7.toString());
        } catch (java.security.NoSuchAlgorithmException v2_4) {
            throw new com.nimbusds.jose.JOSEException(v2_4.getMessage(), v2_4);
        }
    }

Method com.nimbusds.jose.crypto.q.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static javax.crypto.SecretKey a(javax.crypto.SecretKey p2, com.nimbusds.jose.EncryptionMethod p3, byte[] p4, byte[] p5)
    {
        java.io.ByteArrayOutputStream v0_1 = new java.io.ByteArrayOutputStream();
        try {
            v0_1.write(ark>com.nimbusds.jose.crypto.qark>.a);
            java.security.NoSuchAlgorithmException v2_2 = p2.getEncoded();
            v0_1.write(v2_2);
            java.security.NoSuchAlgorithmException v2_10 = (v2_2.length * 8);
            v0_1.write(com.nimbusds.jose.util.h.a((v2_10 / 2)));
            v0_1.write(p3.toString().getBytes(com.nimbusds.jose.util.k.a));
        } catch (java.security.NoSuchAlgorithmException v2_1) {
            throw new com.nimbusds.jose.JOSEException(v2_1.getMessage(), v2_1);
        }
        if (p4 == null) {
            v0_1.write(ark>com.nimbusds.jose.crypto.qark>.b);
        } else {
            v0_1.write(com.nimbusds.jose.util.h.a(p4.length));
            v0_1.write(p4);
        }
        if (p5 == 0) {
            v0_1.write(ark>com.nimbusds.jose.crypto.qark>.b);
        } else {
            v0_1.write(com.nimbusds.jose.util.h.a(p5.length));
            v0_1.write(p5);
        }
        v0_1.write(ark>com.nimbusds.jose.crypto.qark>.c);
        com.nimbusds.jose.JOSEException v3_12 = v0_1.toByteArray();
        try {
            String v4_3 = new StringBuilder("SHA-");
            v4_3.append(v2_10);
            java.security.NoSuchAlgorithmException v2_5 = java.security.MessageDigest.getInstance(v4_3.toString()).digest(v3_12);
            com.nimbusds.jose.JOSEException v3_15 = new byte[(v2_5.length / 2)];
            System.arraycopy(v2_5, 0, v3_15, 0, v3_15.length);
            return new javax.crypto.spec.SecretKeySpec(v3_15, "AES");
        } catch (java.security.NoSuchAlgorithmException v2_8) {
            throw new com.nimbusds.jose.JOSEException(v2_8.getMessage(), v2_8);
        }
    }

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


    public static javax.crypto.SecretKey a(com.nimbusds.jose.EncryptionMethod p1, java.security.SecureRandom p2)
    {
        if (!ark>com.nimbusds.jose.crypto.mark>.a.contains(p1)) {
            throw new com.nimbusds.jose.JOSEException(com.nimbusds.jose.crypto.g.a(p1, ark>com.nimbusds.jose.crypto.mark>.a));
        } else {
            String v1_3 = new byte[com.nimbusds.jose.util.d.c(p1.cekBitLength())];
            p2.nextBytes(v1_3);
            return new javax.crypto.spec.SecretKeySpec(v1_3, "AES");
        }
    }

Method com.nimbusds.jose.crypto.l.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public l(javax.crypto.SecretKey p5)
    {
        this.a = p5;
        com.nimbusds.jose.KeyLengthException v5_3 = p5.getEncoded();
        if (v5_3.length != 32) {
            if (v5_3.length != 48) {
                if (v5_3.length != 64) {
                    throw new com.nimbusds.jose.KeyLengthException("Unsupported AES/CBC/PKCS5Padding/HMAC-SHA2 key length, must be 256, 384 or 512 bits");
                } else {
                    this.b = new javax.crypto.spec.SecretKeySpec(v5_3, 0, 32, "HMACSHA512");
                    this.c = new javax.crypto.spec.SecretKeySpec(v5_3, 32, 32, "AES");
                    this.d = 32;
                }
            } else {
                this.b = new javax.crypto.spec.SecretKeySpec(v5_3, 0, 24, "HMACSHA384");
                this.c = new javax.crypto.spec.SecretKeySpec(v5_3, 24, 24, "AES");
                this.d = 24;
            }
        } else {
            this.b = new javax.crypto.spec.SecretKeySpec(v5_3, 0, 16, "HMACSHA256");
            this.c = new javax.crypto.spec.SecretKeySpec(v5_3, 16, 16, "AES");
            this.d = 16;
        }
        return;
    }

Method com.nimbusds.jose.crypto.b.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private static javax.crypto.Cipher a(javax.crypto.SecretKey p2, boolean p3, byte[] p4, java.security.Provider p5)
    {
        try {
            javax.crypto.Cipher v5_1 = com.nimbusds.jose.crypto.k.a("AES/CBC/PKCS5Padding", p5);
            javax.crypto.spec.SecretKeySpec v0_2 = new javax.crypto.spec.SecretKeySpec(p2.getEncoded(), "AES");
            Exception v2_4 = new javax.crypto.spec.IvParameterSpec(p4);
        } catch (Exception v2_1) {
            throw new com.nimbusds.jose.JOSEException(v2_1.getMessage(), v2_1);
        }
        if (p3 == 0) {
            v5_1.init(2, v0_2, v2_4);
        } else {
            v5_1.init(1, v0_2, v2_4);
        }
        return v5_1;
    }

Method com.microsoft.aad.adal.StorageHelper.getSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private javax.crypto.SecretKey getSecretKey(byte[] p3)
    {
        if (p3 == null) {
            throw new IllegalArgumentException("rawBytes");
        } else {
            return new javax.crypto.spec.SecretKeySpec(p3, "AES");
        }
    }

Method com.microsoft.aad.adal.StorageHelper.getHMacKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private javax.crypto.SecretKey getHMacKey(javax.crypto.SecretKey p3)
    {
        String v0_0 = p3.getEncoded();
        if (v0_0 == null) {
            return p3;
        } else {
            return new javax.crypto.spec.SecretKeySpec(java.security.MessageDigest.getInstance("SHA256").digest(v0_0), "AES");
        }
    }

Method com.baidu.android.pushservice.j.a.b() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static byte[] b(String p2, String p3, byte[] p4)
    {
        if ((!android.text.TextUtils.isEmpty(p2)) && ((!android.text.TextUtils.isEmpty(p3)) && (p4 != null))) {
            javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
            javax.crypto.Cipher v3_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            v3_2.init(2, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
            return v3_2.doFinal(p4);
        } else {
            return 0;
        }
    }

Method com.baidu.android.pushservice.j.a.a() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public static byte[] a(String p2, String p3, byte[] p4)
    {
        javax.crypto.spec.SecretKeySpec v0_1 = new javax.crypto.spec.SecretKeySpec(p3.getBytes(), "AES");
        javax.crypto.Cipher v3_3 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
        v3_3.init(1, v0_1, new javax.crypto.spec.IvParameterSpec(p2.getBytes()));
        return v3_3.doFinal(p4);
    }

Method org.spongycastle.jcajce.util.DefaultJcaJceHelper.createKeyGenerator() calling method javax.crypto.KeyGenerator.getInstance()


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

Method com.microsoft.identity.common.adal.internal.cache.StorageHelper.generateSecretKey() calling method javax.crypto.KeyGenerator.getInstance()


    private javax.crypto.SecretKey generateSecretKey()
    {
        javax.crypto.SecretKey v0_1 = javax.crypto.KeyGenerator.getInstance("AES");
        v0_1.init(256, this.mRandom);
        return v0_1.generateKey();
    }