Info Call to Crypto API

Description

List of all calls to cryptographic methods.

Recommendation

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

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

Cryptographic keys should never be serialized

Technical details

Method com.google.android.exoplayer2.upstream.cache.CachedContentIndex.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public CachedContentIndex(java.io.File p4, byte[] p5, boolean p6)
    {
        this.encrypt = p6;
        if (p5 == null) {
            com.google.android.exoplayer2.util.Assertions.checkState((p6 ^ 1));
            this.cipher = 0;
            this.secretKeySpec = 0;
        } else {
            java.security.NoSuchAlgorithmException v0_0;
            if (p5.length != 16) {
                v0_0 = 0;
            } else {
                v0_0 = 1;
            }
            com.google.android.exoplayer2.util.Assertions.checkArgument(v0_0);
            try {
                this.cipher = com.google.android.exoplayer2.upstream.cache.CachedContentIndex.getCipher();
                this.secretKeySpec = new javax.crypto.spec.SecretKeySpec(p5, "AES");
            } catch (java.security.NoSuchAlgorithmException v0_4) {
                throw new IllegalStateException(v0_4);
            }
        }
        this.keyToContent = new java.util.HashMap();
        this.idToKey = new android.util.SparseArray();
        this.atomicFile = new com.google.android.exoplayer2.util.AtomicFile(new java.io.File(p4, "cached_content_index.exi"));
        return;
    }

Method com.google.android.exoplayer2.upstream.crypto.AesFlushingCipher.<init>() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public AesFlushingCipher(int p9, byte[] p10, long p11, long p13)
    {
        try {
            this.cipher = javax.crypto.Cipher.getInstance("AES/CTR/NoPadding");
            this.blockSize = this.cipher.getBlockSize();
            java.security.NoSuchAlgorithmException v0_1 = new byte[this.blockSize];
            this.zerosBlock = v0_1;
            java.security.NoSuchAlgorithmException v0_3 = new byte[this.blockSize];
            this.flushedBlock = v0_3;
            int v2_3 = ((int) (p13 % ((long) this.blockSize)));
            this.cipher.init(p9, new javax.crypto.spec.SecretKeySpec(p10, com.google.android.exoplayer2.util.Util.splitAtFirst(this.cipher.getAlgorithm(), "/")[0]), new javax.crypto.spec.IvParameterSpec(this.getInitializationVector(p11, (p13 / ((long) this.blockSize)))));
        } catch (java.security.NoSuchAlgorithmException v0_8) {
            throw new RuntimeException(v0_8);
        }
        if (v2_3 != 0) {
            byte[] v3_1 = new byte[v2_3];
            this.updateInPlace(v3_1, 0, v2_3);
        }
        return;
    }

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


    private javax.crypto.SecretKey getHMacKey(javax.crypto.SecretKey p6)
    {
        byte[] v0 = p6.getEncoded();
        if (v0 == null) {
            return p6;
        } else {
            return new javax.crypto.spec.SecretKeySpec(java.security.MessageDigest.getInstance("SHA256").digest(v0), "AES");
        }
    }

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.nimbusds.jose.crypto.AESCBC.createAESCBCCipher() calling method javax.crypto.spec.SecretKeySpec.<init>()


    private static javax.crypto.Cipher createAESCBCCipher(javax.crypto.SecretKey p4, boolean p5, byte[] p6, java.security.Provider p7)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("AES/CBC/PKCS5Padding", p7);
            com.nimbusds.jose.JOSEException v1_3 = new javax.crypto.spec.SecretKeySpec(p4.getEncoded(), "AES");
            String v2_3 = new javax.crypto.spec.IvParameterSpec(p6);
        } catch (Exception v0_1) {
            throw new com.nimbusds.jose.JOSEException(v0_1.getMessage(), v0_1);
        }
        if (!p5) {
            v0_2.init(2, v1_3, v2_3);
        } else {
            v0_2.init(1, v1_3, v2_3);
        }
        return v0_2;
    }

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


    public static javax.crypto.SecretKey decryptCEK(javax.crypto.SecretKey p6, byte[] p7, com.nimbusds.jose.crypto.AuthenticatedCipherText p8, int p9, java.security.Provider p10)
    {
        String v3_3 = new byte[0];
        byte[] v0_0 = com.nimbusds.jose.crypto.AESGCM.decrypt(p6, p7, p8.getCipherText(), v3_3, p8.getAuthenticationTag(), p10);
        if (com.nimbusds.jose.util.ByteUtils.safeBitLength(v0_0) != p9) {
            String v2_2 = new StringBuilder("CEK key length mismatch: ");
            v2_2.append(com.nimbusds.jose.util.ByteUtils.safeBitLength(v0_0));
            v2_2.append(" != ");
            v2_2.append(p9);
            throw new com.nimbusds.jose.KeyLengthException(v2_2.toString());
        } else {
            return new javax.crypto.spec.SecretKeySpec(v0_0, "AES");
        }
    }

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


    public CompositeKey(javax.crypto.SecretKey p6)
    {
        this.inputKey = p6;
        byte[] v0 = p6.getEncoded();
        if (v0.length != 32) {
            if (v0.length != 48) {
                if (v0.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.macKey = new javax.crypto.spec.SecretKeySpec(v0, 0, 32, "HMACSHA512");
                    this.encKey = new javax.crypto.spec.SecretKeySpec(v0, 32, 32, "AES");
                    this.truncatedMacLength = 32;
                }
            } else {
                this.macKey = new javax.crypto.spec.SecretKeySpec(v0, 0, 24, "HMACSHA384");
                this.encKey = new javax.crypto.spec.SecretKeySpec(v0, 24, 24, "AES");
                this.truncatedMacLength = 24;
            }
        } else {
            this.macKey = new javax.crypto.spec.SecretKeySpec(v0, 0, 16, "HMACSHA256");
            this.encKey = new javax.crypto.spec.SecretKeySpec(v0, 16, 16, "AES");
            this.truncatedMacLength = 16;
        }
        return;
    }

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


    public static javax.crypto.SecretKey generateCEK(com.nimbusds.jose.EncryptionMethod p3, java.security.SecureRandom p4)
    {
        if (!com.nimbusds.jose.crypto.ContentCryptoProvider.SUPPORTED_ENCRYPTION_METHODS.contains(p3)) {
            throw new com.nimbusds.jose.JOSEException(com.nimbusds.jose.crypto.AlgorithmSupportMessage.unsupportedEncryptionMethod(p3, com.nimbusds.jose.crypto.ContentCryptoProvider.SUPPORTED_ENCRYPTION_METHODS));
        } else {
            com.nimbusds.jose.JOSEException v0_3 = new byte[com.nimbusds.jose.util.ByteUtils.byteLength(p3.cekBitLength())];
            p4.nextBytes(v0_3);
            return new javax.crypto.spec.SecretKeySpec(v0_3, "AES");
        }
    }

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


    static javax.crypto.SecretKey deriveSharedSecret(java.security.interfaces.ECPublicKey p5, java.security.interfaces.ECPrivateKey p6, java.security.Provider p7)
    {
        java.security.NoSuchAlgorithmException v0_1;
        if (p7 == null) {
            v0_1 = javax.crypto.KeyAgreement.getInstance("ECDH");
        } else {
            v0_1 = javax.crypto.KeyAgreement.getInstance("ECDH", p7);
        }
        try {
            v0_1.init(p6);
            v0_1.doPhase(p5, 1);
            return new javax.crypto.spec.SecretKeySpec(v0_1.generateSecret(), "AES");
        } catch (java.security.InvalidKeyException v1_5) {
            String v3_4 = new StringBuilder("Invalid key for ECDH key agreement: ");
            v3_4.append(v1_5.getMessage());
            throw new com.nimbusds.jose.JOSEException(v3_4.toString(), v1_5);
        }
    }

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


    public static byte[] compute(String p1, byte[] p2, byte[] p3, java.security.Provider p4)
    {
        return com.nimbusds.jose.crypto.HMAC.compute(new javax.crypto.spec.SecretKeySpec(p2, p1), p3, p4);
    }

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


    public static javax.crypto.SecretKey generateCEK(javax.crypto.SecretKey p8, com.nimbusds.jose.EncryptionMethod p9, byte[] p10, byte[] p11)
    {
        java.io.ByteArrayOutputStream v0_1 = new java.io.ByteArrayOutputStream();
        try {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ONE_BYTES);
            byte[] v1_3 = p8.getEncoded();
            v0_1.write(v1_3);
            java.security.NoSuchAlgorithmException v2_8 = (v1_3.length * 8);
            String v3_1 = v2_8;
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes((v2_8 / 2)));
            v0_1.write(p9.toString().getBytes(com.nimbusds.jose.util.StandardCharset.UTF_8));
        } catch (byte[] v1_1) {
            throw new com.nimbusds.jose.JOSEException(v1_1.getMessage(), v1_1);
        }
        if (p10 == null) {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ZERO_BYTES);
        } else {
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes(p10.length));
            v0_1.write(p10);
        }
        if (p11 == null) {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ZERO_BYTES);
        } else {
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes(p11.length));
            v0_1.write(p11);
        }
        v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ENCRYPTION_BYTES);
        byte[] v1_2 = v0_1.toByteArray();
        try {
            java.security.NoSuchAlgorithmException v2_3 = new StringBuilder("SHA-");
            v2_3.append(v3_1);
            java.security.NoSuchAlgorithmException v2_5 = java.security.MessageDigest.getInstance(v2_3.toString());
            com.nimbusds.jose.JOSEException v4_2 = v2_5.digest(v1_2);
            String v5_3 = new byte[(v4_2.length / 2)];
            System.arraycopy(v4_2, 0, v5_3, 0, v5_3.length);
            return new javax.crypto.spec.SecretKeySpec(v5_3, "AES");
        } catch (java.security.NoSuchAlgorithmException v2_7) {
            throw new com.nimbusds.jose.JOSEException(v2_7.getMessage(), v2_7);
        }
    }

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


    public static javax.crypto.SecretKey generateCIK(javax.crypto.SecretKey p9, com.nimbusds.jose.EncryptionMethod p10, byte[] p11, byte[] p12)
    {
        java.io.ByteArrayOutputStream v0_1 = new java.io.ByteArrayOutputStream();
        try {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ONE_BYTES);
            byte[] v1_3 = p9.getEncoded();
            v0_1.write(v1_3);
            java.security.NoSuchAlgorithmException v2_8 = (v1_3.length * 8);
            String v3_1 = v2_8;
            int v4 = v2_8;
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes(v4));
            v0_1.write(p10.toString().getBytes(com.nimbusds.jose.util.StandardCharset.UTF_8));
        } catch (byte[] v1_1) {
            throw new com.nimbusds.jose.JOSEException(v1_1.getMessage(), v1_1);
        }
        if (p11 == null) {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ZERO_BYTES);
        } else {
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes(p11.length));
            v0_1.write(p11);
        }
        if (p12 == null) {
            v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.ZERO_BYTES);
        } else {
            v0_1.write(com.nimbusds.jose.util.IntegerUtils.toBytes(p12.length));
            v0_1.write(p12);
        }
        v0_1.write(com.nimbusds.jose.crypto.LegacyConcatKDF.INTEGRITY_BYTES);
        byte[] v1_2 = v0_1.toByteArray();
        try {
            java.security.NoSuchAlgorithmException v2_3 = new StringBuilder("SHA-");
            v2_3.append(v3_1);
            java.security.NoSuchAlgorithmException v2_5 = java.security.MessageDigest.getInstance(v2_3.toString());
            String v6_2 = v2_5.digest(v1_2);
            String v7_9 = new StringBuilder("HMACSHA");
            v7_9.append(v4);
            return new javax.crypto.spec.SecretKeySpec(v6_2, v7_9.toString());
        } catch (java.security.NoSuchAlgorithmException v2_6) {
            throw new com.nimbusds.jose.JOSEException(v2_6.getMessage(), v2_6);
        }
    }

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


    public static javax.crypto.SecretKey deriveKey(byte[] p12, byte[] p13, int p14, com.nimbusds.jose.crypto.PRFParams p15)
    {
        javax.crypto.Mac v1_2 = com.nimbusds.jose.crypto.HMAC.getInitMac(new javax.crypto.spec.SecretKeySpec(p12, p15.getMACAlgorithm()), p15.getMacProvider());
        int v2 = v1_2.getMacLength();
        if (((long) p15.getDerivedKeyByteLength()) > 2.1219957905e-314) {
            String v6_1 = new StringBuilder("derived key too long ");
            v6_1.append(p15.getDerivedKeyByteLength());
            throw new com.nimbusds.jose.JOSEException(v6_1.toString());
        } else {
            com.nimbusds.jose.JOSEException v5_9 = ((int) Math.ceil((((double) p15.getDerivedKeyByteLength()) / ((double) v2))));
            String v6_4 = (p15.getDerivedKeyByteLength() - ((v5_9 - 1) * v2));
            int v7_6 = new java.io.ByteArrayOutputStream();
            int v8_0 = 0;
            while (v8_0 < v5_9) {
                byte[] v9_1 = com.nimbusds.jose.crypto.PBKDF2.extractBlock(p13, p14, (v8_0 + 1), v1_2);
                if (v8_0 == (v5_9 - 1)) {
                    v9_1 = com.nimbusds.jose.util.ByteUtils.subArray(v9_1, 0, v6_4);
                }
                v7_6.write(v9_1, 0, v9_1.length);
                v8_0++;
            }
            return new javax.crypto.spec.SecretKeySpec(v7_6.toByteArray(), "AES");
        }
    }

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


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p4, byte[] p5, int p6, java.security.Provider p7)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/PKCS1Padding", p7);
            v0_2.init(2, p4);
            com.nimbusds.jose.JOSEException v1_3 = v0_2.doFinal(p5);
        } catch (Exception v0_1) {
            javax.crypto.spec.SecretKeySpec v2_4 = new StringBuilder("Couldn\'t decrypt Content Encryption Key (CEK): ");
            v2_4.append(v0_1.getMessage());
            throw new com.nimbusds.jose.JOSEException(v2_4.toString(), v0_1);
        }
        if (com.nimbusds.jose.util.ByteUtils.safeBitLength(v1_3) == p6) {
            return new javax.crypto.spec.SecretKeySpec(v1_3, "AES");
        } else {
            return 0;
        }
    }

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


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p4, byte[] p5, java.security.Provider p6)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding", p6);
            v0_2.init(2, p4);
            return new javax.crypto.spec.SecretKeySpec(v0_2.doFinal(p5), "AES");
        } catch (Exception v0_1) {
            throw new com.nimbusds.jose.JOSEException(v0_1.getMessage(), v0_1);
        }
    }

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


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p6, byte[] p7, java.security.Provider p8)
    {
        try {
            Exception v0_1 = com.nimbusds.jose.crypto.AlgorithmParametersHelper.getInstance("OAEP", p8);
            v0_1.init(new javax.crypto.spec.OAEPParameterSpec("SHA-256", "MGF1", java.security.spec.MGF1ParameterSpec.SHA256, javax.crypto.spec.PSource$PSpecified.DEFAULT));
            String v2_1 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", p8);
            v2_1.init(2, p6, v0_1);
            return new javax.crypto.spec.SecretKeySpec(v2_1.doFinal(p7), "AES");
        } catch (Exception v0_2) {
            throw new com.nimbusds.jose.JOSEException(v0_2.getMessage(), v0_2);
        }
    }

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


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

Method com.google.android.exoplayer2.source.hls.Aes128DataSource.open() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public long open(com.google.android.exoplayer2.upstream.DataSpec p7)
    {
        try {
            java.security.NoSuchAlgorithmException v0_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
            try {
                v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
                java.security.InvalidKeyException v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
                this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
                v3_3.open();
                return -1;
            } catch (java.security.InvalidKeyException v3_4) {
                throw new RuntimeException(v3_4);
            }
        } catch (java.security.NoSuchAlgorithmException v0_1) {
            throw new RuntimeException(v0_1);
        }
        v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
        v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
        this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
        v3_3.open();
        return -1;
    }

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 p6)
    {
        byte[] v0 = p6.getEncoded();
        if (v0 == null) {
            return p6;
        } else {
            return new javax.crypto.spec.SecretKeySpec(java.security.MessageDigest.getInstance("SHA256").digest(v0), "AES");
        }
    }

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.nimbusds.jose.crypto.ConcatKDF.deriveKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public javax.crypto.SecretKey deriveKey(javax.crypto.SecretKey p9, int p10, byte[] p11)
    {
        java.io.ByteArrayOutputStream v0_1 = new java.io.ByteArrayOutputStream();
        java.security.MessageDigest v1 = this.getMessageDigest();
        int v2_0 = 1;
        while (v2_0 <= com.nimbusds.jose.crypto.ConcatKDF.computeDigestCycles(com.nimbusds.jose.util.ByteUtils.safeBitLength(v1.getDigestLength()), p10)) {
            v1.update(com.nimbusds.jose.util.IntegerUtils.toBytes(v2_0));
            v1.update(p9.getEncoded());
            if (p11 != null) {
                v1.update(p11);
            }
            try {
                v0_1.write(v1.digest());
                v2_0++;
            } catch (java.io.IOException v4_2) {
                String v6_1 = new StringBuilder("Couldn\'t write derived key: ");
                v6_1.append(v4_2.getMessage());
                throw new com.nimbusds.jose.JOSEException(v6_1.toString(), v4_2);
            }
        }
        int v2_1 = v0_1.toByteArray();
        byte[] v3_2 = com.nimbusds.jose.util.ByteUtils.byteLength(p10);
        if (v2_1.length != v3_2) {
            return new javax.crypto.spec.SecretKeySpec(com.nimbusds.jose.util.ByteUtils.subArray(v2_1, 0, v3_2), "AES");
        } else {
            return new javax.crypto.spec.SecretKeySpec(v2_1, "AES");
        }
    }

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 com.nimbusds.jose.crypto.MACProvider.getSecretKey() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public javax.crypto.SecretKey getSecretKey()
    {
        return new javax.crypto.spec.SecretKeySpec(this.secret, "MAC");
    }

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


    public AESDecrypter(byte[] p3)
    {
        this(new javax.crypto.spec.SecretKeySpec(p3, "AES"));
        return;
    }

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


    public AESEncrypter(byte[] p3)
    {
        this(new javax.crypto.spec.SecretKeySpec(p3, "AES"));
        return;
    }

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


    public DirectDecrypter(byte[] p3)
    {
        this(new javax.crypto.spec.SecretKeySpec(p3, "AES"));
        return;
    }

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


    public DirectEncrypter(byte[] p3)
    {
        this(new javax.crypto.spec.SecretKeySpec(p3, "AES"));
        return;
    }

Method dev.jci.mwp.utils.EncryptionDecryption.decryptString() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public final String decryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "decriptText");
        byte[] v0_2 = android.util.Base64.decode(p7, 0);
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(2, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        byte[] v3_3 = v2_2.doFinal(v0_2);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v3_3, "decrypted");
        return new String(v3_3, kotlin.text.Charsets.UTF_8);
    }

Method dev.jci.mwp.utils.EncryptionDecryption.encryptString() calling method javax.crypto.spec.SecretKeySpec.<init>()


    public final String encryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "plainText");
        byte[] v0_2 = p7.getBytes(kotlin.text.Charsets.UTF_8);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v0_2, "(this as java.lang.String).getBytes(charset)");
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(1, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        String v4_3 = android.util.Base64.encodeToString(v2_2.doFinal(v0_2), 0);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v4_3, "Base64.encodeToString(encrypted, Base64.DEFAULT)");
        return v4_3;
    }

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


    private okio.ByteString hmac(String p4, okio.ByteString p5)
    {
        try {
            java.security.InvalidKeyException v0_0 = javax.crypto.Mac.getInstance(p4);
            v0_0.init(new javax.crypto.spec.SecretKeySpec(p5.toByteArray(), p4));
            return okio.ByteString.of(v0_0.doFinal(this.data));
        } catch (java.security.InvalidKeyException v0_2) {
            throw new AssertionError(v0_2);
        } catch (java.security.InvalidKeyException v0_1) {
            throw new IllegalArgumentException(v0_1);
        }
    }

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


    private okio.ByteString hmac(String p7, okio.ByteString p8)
    {
        try {
            java.security.InvalidKeyException v0_0 = javax.crypto.Mac.getInstance(p7);
            v0_0.init(new javax.crypto.spec.SecretKeySpec(p8.toByteArray(), p7));
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0_1) {
            throw new IllegalArgumentException(v0_1);
        }
        if (this.head != null) {
            v0_0.update(this.head.data, this.head.pos, (this.head.limit - this.head.pos));
            okio.Segment v1_3 = this.head.next;
            while (v1_3 != this.head) {
                v0_0.update(v1_3.data, v1_3.pos, (v1_3.limit - v1_3.pos));
                v1_3 = v1_3.next;
            }
        }
        return okio.ByteString.of(v0_0.doFinal());
    }

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


    private HashingSink(okio.Sink p4, okio.ByteString p5, String p6)
    {
        super(p4);
        try {
            super.mac = javax.crypto.Mac.getInstance(p6);
            super.mac.init(new javax.crypto.spec.SecretKeySpec(p5.toByteArray(), p6));
            super.messageDigest = 0;
            return;
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0_1) {
            throw new IllegalArgumentException(v0_1);
        }
    }

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


    private HashingSource(okio.Source p4, okio.ByteString p5, String p6)
    {
        super(p4);
        try {
            super.mac = javax.crypto.Mac.getInstance(p6);
            super.mac.init(new javax.crypto.spec.SecretKeySpec(p5.toByteArray(), p6));
            super.messageDigest = 0;
            return;
        } catch (java.security.InvalidKeyException v0) {
            throw new AssertionError();
        } catch (java.security.InvalidKeyException v0_1) {
            throw new IllegalArgumentException(v0_1);
        }
    }

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


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

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


    public String encrypt(String p14)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p14)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v3_1 = new StringBuilder();
            v3_1.append("Encrypt version:");
            v3_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v3_1.toString());
            IllegalArgumentException v1_6 = this.mBlobVersion.getBytes("UTF_8");
            String v2_4 = p14.getBytes("UTF_8");
            byte[] v3_4 = new byte[16];
            this.mRandom.nextBytes(v3_4);
            javax.crypto.spec.IvParameterSpec v4_4 = new javax.crypto.spec.IvParameterSpec(v3_4);
            javax.crypto.Cipher v5_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v6_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v5_1.init(1, this.mKey, v4_4);
            byte[] v7_1 = v5_1.doFinal(v2_4);
            v6_1.init(this.mHMACKey);
            v6_1.update(v1_6);
            v6_1.update(v7_1);
            v6_1.update(v3_4);
            byte[] v8_2 = v6_1.doFinal();
            byte[] v9_4 = new byte[(((v1_6.length + v7_1.length) + v3_4.length) + v8_2.length)];
            System.arraycopy(v1_6, 0, v9_4, 0, v1_6.length);
            System.arraycopy(v7_1, 0, v9_4, v1_6.length, v7_1.length);
            System.arraycopy(v3_4, 0, v9_4, (v1_6.length + v7_1.length), v3_4.length);
            System.arraycopy(v8_2, 0, v9_4, ((v1_6.length + v7_1.length) + v3_4.length), v8_2.length);
            String v10_11 = new String(android.util.Base64.encode(v9_4, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v11_6 = new StringBuilder();
            v11_6.append(this.getEncodeVersionLengthPrefix());
            v11_6.append("E1");
            v11_6.append(v10_11);
            return v11_6.toString();
        }
    }

Method com.nimbusds.jose.crypto.AESCBC.decrypt() calling method javax.crypto.Cipher.doFinal()


    public static byte[] decrypt(javax.crypto.SecretKey p4, byte[] p5, byte[] p6, java.security.Provider p7)
    {
        try {
            return com.nimbusds.jose.crypto.AESCBC.createAESCBCCipher(p4, 0, p5, p7).doFinal(p6);
        } catch (Exception v1_1) {
            throw new com.nimbusds.jose.JOSEException(v1_1.getMessage(), v1_1);
        }
    }

Method com.nimbusds.jose.crypto.AESCBC.encrypt() calling method javax.crypto.Cipher.doFinal()


    public static byte[] encrypt(javax.crypto.SecretKey p4, byte[] p5, byte[] p6, java.security.Provider p7)
    {
        try {
            return com.nimbusds.jose.crypto.AESCBC.createAESCBCCipher(p4, 1, p5, p7).doFinal(p6);
        } catch (Exception v1_1) {
            throw new com.nimbusds.jose.JOSEException(v1_1.getMessage(), v1_1);
        }
    }

Method com.nimbusds.jose.crypto.AESGCM.decrypt() calling method javax.crypto.Cipher.doFinal()


    public static byte[] decrypt(javax.crypto.SecretKey p6, byte[] p7, byte[] p8, byte[] p9, byte[] p10, java.security.Provider p11)
    {
        byte[] v1_2;
        javax.crypto.SecretKey v0 = com.nimbusds.jose.util.KeyUtils.toAESKey(p6);
        if (p11 == null) {
            v1_2 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
        } else {
            v1_2 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p11);
        }
        v1_2.init(2, v0, new javax.crypto.spec.GCMParameterSpec(128, p7));
        v1_2.updateAAD(p9);
        try {
            javax.crypto.IllegalBlockSizeException v2_4 = new byte[][2];
            v2_4[0] = p8;
            v2_4[1] = p10;
            return v1_2.doFinal(com.nimbusds.jose.util.ByteUtils.concat(v2_4));
        } catch (javax.crypto.IllegalBlockSizeException v2_7) {
            String v4_3 = new StringBuilder("AES/GCM/NoPadding decryption failed: ");
            v4_3.append(v2_7.getMessage());
            throw new com.nimbusds.jose.JOSEException(v4_3.toString(), v2_7);
        }
    }

Method com.nimbusds.jose.crypto.AESGCM.encrypt() calling method javax.crypto.Cipher.doFinal()


    public static com.nimbusds.jose.crypto.AuthenticatedCipherText encrypt(javax.crypto.SecretKey p8, com.nimbusds.jose.util.Container p9, byte[] p10, byte[] p11, java.security.Provider p12)
    {
        com.nimbusds.jose.crypto.AuthenticatedCipherText v2_0;
        javax.crypto.SecretKey v0 = com.nimbusds.jose.util.KeyUtils.toAESKey(p8);
        byte[] v1_1 = ((byte[]) p9.get());
        if (p12 == null) {
            v2_0 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
        } else {
            v2_0 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p12);
        }
        v2_0.init(1, v0, new javax.crypto.spec.GCMParameterSpec(128, v1_1));
        v2_0.updateAAD(p11);
        try {
            javax.crypto.IllegalBlockSizeException v3_4 = v2_0.doFinal(p10);
            String v5_4 = (v3_4.length - com.nimbusds.jose.util.ByteUtils.byteLength(128));
            String v6_2 = com.nimbusds.jose.util.ByteUtils.subArray(v3_4, 0, v5_4);
            com.nimbusds.jose.JOSEException v4_5 = com.nimbusds.jose.util.ByteUtils.subArray(v3_4, v5_4, com.nimbusds.jose.util.ByteUtils.byteLength(128));
            p9.set(com.nimbusds.jose.crypto.AESGCM.actualIVOf(v2_0));
            return new com.nimbusds.jose.crypto.AuthenticatedCipherText(v6_2, v4_5);
        } catch (javax.crypto.IllegalBlockSizeException v3_5) {
            String v5_6 = new StringBuilder("Couldn\'t encrypt with AES/GCM/NoPadding: ");
            v5_6.append(v3_5.getMessage());
            throw new com.nimbusds.jose.JOSEException(v5_6.toString(), v3_5);
        }
    }

Method com.nimbusds.jose.crypto.RSA1_5.decryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p4, byte[] p5, int p6, java.security.Provider p7)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/PKCS1Padding", p7);
            v0_2.init(2, p4);
            com.nimbusds.jose.JOSEException v1_3 = v0_2.doFinal(p5);
        } catch (Exception v0_1) {
            javax.crypto.spec.SecretKeySpec v2_4 = new StringBuilder("Couldn\'t decrypt Content Encryption Key (CEK): ");
            v2_4.append(v0_1.getMessage());
            throw new com.nimbusds.jose.JOSEException(v2_4.toString(), v0_1);
        }
        if (com.nimbusds.jose.util.ByteUtils.safeBitLength(v1_3) == p6) {
            return new javax.crypto.spec.SecretKeySpec(v1_3, "AES");
        } else {
            return 0;
        }
    }

Method com.nimbusds.jose.crypto.RSA1_5.encryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static byte[] encryptCEK(java.security.interfaces.RSAPublicKey p4, javax.crypto.SecretKey p5, java.security.Provider p6)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/PKCS1Padding", p6);
            v0_2.init(1, p4);
            return v0_2.doFinal(p5.getEncoded());
        } catch (Exception v0_3) {
            throw new com.nimbusds.jose.JOSEException("RSA block size exception: The RSA key is too short, try a longer one", v0_3);
        } catch (Exception v0_1) {
            String v2_1 = new StringBuilder("Couldn\'t encrypt Content Encryption Key (CEK): ");
            v2_1.append(v0_1.getMessage());
            throw new com.nimbusds.jose.JOSEException(v2_1.toString(), v0_1);
        }
    }

Method com.nimbusds.jose.crypto.RSA_OAEP.decryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p4, byte[] p5, java.security.Provider p6)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding", p6);
            v0_2.init(2, p4);
            return new javax.crypto.spec.SecretKeySpec(v0_2.doFinal(p5), "AES");
        } catch (Exception v0_1) {
            throw new com.nimbusds.jose.JOSEException(v0_1.getMessage(), v0_1);
        }
    }

Method com.nimbusds.jose.crypto.RSA_OAEP.encryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static byte[] encryptCEK(java.security.interfaces.RSAPublicKey p3, javax.crypto.SecretKey p4, java.security.Provider p5)
    {
        try {
            Exception v0_3 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA-1AndMGF1Padding", p5);
            v0_3.init(1, p3, new java.security.SecureRandom());
            return v0_3.doFinal(p4.getEncoded());
        } catch (Exception v0_2) {
            throw new com.nimbusds.jose.JOSEException("RSA block size exception: The RSA key is too short, try a longer one", v0_2);
        } catch (Exception v0_1) {
            throw new com.nimbusds.jose.JOSEException(v0_1.getMessage(), v0_1);
        }
    }

Method com.nimbusds.jose.crypto.RSA_OAEP_256.decryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static javax.crypto.SecretKey decryptCEK(java.security.PrivateKey p6, byte[] p7, java.security.Provider p8)
    {
        try {
            Exception v0_1 = com.nimbusds.jose.crypto.AlgorithmParametersHelper.getInstance("OAEP", p8);
            v0_1.init(new javax.crypto.spec.OAEPParameterSpec("SHA-256", "MGF1", java.security.spec.MGF1ParameterSpec.SHA256, javax.crypto.spec.PSource$PSpecified.DEFAULT));
            String v2_1 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", p8);
            v2_1.init(2, p6, v0_1);
            return new javax.crypto.spec.SecretKeySpec(v2_1.doFinal(p7), "AES");
        } catch (Exception v0_2) {
            throw new com.nimbusds.jose.JOSEException(v0_2.getMessage(), v0_2);
        }
    }

Method com.nimbusds.jose.crypto.RSA_OAEP_256.encryptCEK() calling method javax.crypto.Cipher.doFinal()


    public static byte[] encryptCEK(java.security.interfaces.RSAPublicKey p6, javax.crypto.SecretKey p7, java.security.Provider p8)
    {
        try {
            Exception v0_1 = com.nimbusds.jose.crypto.AlgorithmParametersHelper.getInstance("OAEP", p8);
            v0_1.init(new javax.crypto.spec.OAEPParameterSpec("SHA-256", "MGF1", java.security.spec.MGF1ParameterSpec.SHA256, javax.crypto.spec.PSource$PSpecified.DEFAULT));
            String v2_1 = com.nimbusds.jose.crypto.CipherHelper.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", p8);
            v2_1.init(1, p6, v0_1);
            return v2_1.doFinal(p7.getEncoded());
        } catch (Exception v0_3) {
            throw new com.nimbusds.jose.JOSEException("RSA block size exception: The RSA key is too short, try a longer one", v0_3);
        } catch (Exception v0_2) {
            throw new com.nimbusds.jose.JOSEException(v0_2.getMessage(), v0_2);
        }
    }

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


    public String decrypt(String p17)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p17)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v3_1 = (p17.charAt(0) - 97);
            if (v3_1 <= null) {
                byte[] v4_1 = new Object[1];
                v4_1[0] = Integer.valueOf(v3_1);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v4_1));
            } else {
                if (!p17.substring(1, (v3_1 + 1)).equals("E1")) {
                    String v6_4 = new Object[2];
                    v6_4[0] = p17;
                    v6_4[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v6_4));
                } else {
                    byte[] v4_4 = android.util.Base64.decode(p17.substring((v3_1 + 1)), 0);
                    IllegalArgumentException v5_8 = new String(v4_4, 0, 4, "UTF_8");
                    javax.crypto.SecretKey v9_1 = new StringBuilder();
                    v9_1.append("Encrypt version:");
                    v9_1.append(v5_8);
                    android.util.Log.v("StorageHelper", v9_1.toString());
                    javax.crypto.SecretKey v7_2 = this.getKey(v5_8);
                    javax.crypto.SecretKey v9_3 = this.getHMacKey(v7_2);
                    int v10_3 = ((v4_4.length - 16) - 32);
                    int v12_1 = (v4_4.length - 32);
                    int v13 = (v10_3 - 4);
                    if ((v10_3 < 0) || ((v12_1 < 0) || (v13 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v14_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v15_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v15_1.init(v9_3);
                        v15_1.update(v4_4, 0, v12_1);
                        this.assertHMac(v4_4, v12_1, v4_4.length, v15_1.doFinal());
                        v14_1.init(2, v7_2, new javax.crypto.spec.IvParameterSpec(v4_4, v10_3, 16));
                        String v6_0 = new String(v14_1.doFinal(v4_4, 4, v13), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v6_0;
                    }
                }
            }
        }
    }

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


    public String encrypt(String p13)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p13)) {
            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());
            IllegalArgumentException v0_6 = this.mBlobVersion.getBytes("UTF_8");
            String v1_6 = p13.getBytes("UTF_8");
            byte[] v2_3 = new byte[16];
            this.mRandom.nextBytes(v2_3);
            javax.crypto.spec.IvParameterSpec v3_2 = new javax.crypto.spec.IvParameterSpec(v2_3);
            javax.crypto.Cipher v4_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v5_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v4_1.init(1, this.mKey, v3_2);
            byte[] v6_1 = v4_1.doFinal(v1_6);
            v5_1.init(this.mHMACKey);
            v5_1.update(v0_6);
            v5_1.update(v6_1);
            v5_1.update(v2_3);
            byte[] v7_2 = v5_1.doFinal();
            byte[] v8_4 = new byte[(((v0_6.length + v6_1.length) + v2_3.length) + v7_2.length)];
            System.arraycopy(v0_6, 0, v8_4, 0, v0_6.length);
            System.arraycopy(v6_1, 0, v8_4, v0_6.length, v6_1.length);
            System.arraycopy(v2_3, 0, v8_4, (v0_6.length + v6_1.length), v2_3.length);
            System.arraycopy(v7_2, 0, v8_4, ((v0_6.length + v6_1.length) + v2_3.length), v7_2.length);
            String v9_11 = new String(android.util.Base64.encode(v8_4, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v10_6 = new StringBuilder();
            v10_6.append(this.getEncodeVersionLengthPrefix());
            v10_6.append("E1");
            v10_6.append(v9_11);
            return v10_6.toString();
        }
    }

Method dev.jci.mwp.utils.EncryptionDecryption.decryptString() calling method javax.crypto.Cipher.doFinal()


    public final String decryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "decriptText");
        byte[] v0_2 = android.util.Base64.decode(p7, 0);
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(2, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        byte[] v3_3 = v2_2.doFinal(v0_2);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v3_3, "decrypted");
        return new String(v3_3, kotlin.text.Charsets.UTF_8);
    }

Method dev.jci.mwp.utils.EncryptionDecryption.encryptString() calling method javax.crypto.Cipher.doFinal()


    public final String encryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "plainText");
        byte[] v0_2 = p7.getBytes(kotlin.text.Charsets.UTF_8);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v0_2, "(this as java.lang.String).getBytes(charset)");
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(1, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        String v4_3 = android.util.Base64.encodeToString(v2_2.doFinal(v0_2), 0);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v4_3, "Base64.encodeToString(encrypted, Base64.DEFAULT)");
        return v4_3;
    }

Method com.google.android.exoplayer2.upstream.cache.CachedContentIndex.getCipher() calling method javax.crypto.Cipher.getInstance()


    private static javax.crypto.Cipher getCipher()
    {
        if (com.google.android.exoplayer2.util.Util.SDK_INT == 18) {
            try {
                return javax.crypto.Cipher.getInstance("AES/CBC/PKCS5PADDING", "BC");
            } catch (Throwable v0) {
            }
        }
        return javax.crypto.Cipher.getInstance("AES/CBC/PKCS5PADDING");
    }

Method com.google.android.exoplayer2.upstream.crypto.AesFlushingCipher.<init>() calling method javax.crypto.Cipher.getInstance()


    public AesFlushingCipher(int p9, byte[] p10, long p11, long p13)
    {
        try {
            this.cipher = javax.crypto.Cipher.getInstance("AES/CTR/NoPadding");
            this.blockSize = this.cipher.getBlockSize();
            java.security.NoSuchAlgorithmException v0_1 = new byte[this.blockSize];
            this.zerosBlock = v0_1;
            java.security.NoSuchAlgorithmException v0_3 = new byte[this.blockSize];
            this.flushedBlock = v0_3;
            int v2_3 = ((int) (p13 % ((long) this.blockSize)));
            this.cipher.init(p9, new javax.crypto.spec.SecretKeySpec(p10, com.google.android.exoplayer2.util.Util.splitAtFirst(this.cipher.getAlgorithm(), "/")[0]), new javax.crypto.spec.IvParameterSpec(this.getInitializationVector(p11, (p13 / ((long) this.blockSize)))));
        } catch (java.security.NoSuchAlgorithmException v0_8) {
            throw new RuntimeException(v0_8);
        }
        if (v2_3 != 0) {
            byte[] v3_1 = new byte[v2_3];
            this.updateInPlace(v3_1, 0, v2_3);
        }
        return;
    }

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


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

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.decrypt() calling method javax.crypto.Cipher.getInstance()


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

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


    public String encrypt(String p14)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p14)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v3_1 = new StringBuilder();
            v3_1.append("Encrypt version:");
            v3_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v3_1.toString());
            IllegalArgumentException v1_6 = this.mBlobVersion.getBytes("UTF_8");
            String v2_4 = p14.getBytes("UTF_8");
            byte[] v3_4 = new byte[16];
            this.mRandom.nextBytes(v3_4);
            javax.crypto.spec.IvParameterSpec v4_4 = new javax.crypto.spec.IvParameterSpec(v3_4);
            javax.crypto.Cipher v5_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v6_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v5_1.init(1, this.mKey, v4_4);
            byte[] v7_1 = v5_1.doFinal(v2_4);
            v6_1.init(this.mHMACKey);
            v6_1.update(v1_6);
            v6_1.update(v7_1);
            v6_1.update(v3_4);
            byte[] v8_2 = v6_1.doFinal();
            byte[] v9_4 = new byte[(((v1_6.length + v7_1.length) + v3_4.length) + v8_2.length)];
            System.arraycopy(v1_6, 0, v9_4, 0, v1_6.length);
            System.arraycopy(v7_1, 0, v9_4, v1_6.length, v7_1.length);
            System.arraycopy(v3_4, 0, v9_4, (v1_6.length + v7_1.length), v3_4.length);
            System.arraycopy(v8_2, 0, v9_4, ((v1_6.length + v7_1.length) + v3_4.length), v8_2.length);
            String v10_11 = new String(android.util.Base64.encode(v9_4, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v11_6 = new StringBuilder();
            v11_6.append(this.getEncodeVersionLengthPrefix());
            v11_6.append("E1");
            v11_6.append(v10_11);
            return v11_6.toString();
        }
    }

Method com.nimbusds.jose.crypto.AESGCM.decrypt() calling method javax.crypto.Cipher.getInstance()


    public static byte[] decrypt(javax.crypto.SecretKey p6, byte[] p7, byte[] p8, byte[] p9, byte[] p10, java.security.Provider p11)
    {
        byte[] v1_2;
        javax.crypto.SecretKey v0 = com.nimbusds.jose.util.KeyUtils.toAESKey(p6);
        if (p11 == null) {
            v1_2 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
        } else {
            v1_2 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p11);
        }
        v1_2.init(2, v0, new javax.crypto.spec.GCMParameterSpec(128, p7));
        v1_2.updateAAD(p9);
        try {
            javax.crypto.IllegalBlockSizeException v2_4 = new byte[][2];
            v2_4[0] = p8;
            v2_4[1] = p10;
            return v1_2.doFinal(com.nimbusds.jose.util.ByteUtils.concat(v2_4));
        } catch (javax.crypto.IllegalBlockSizeException v2_7) {
            String v4_3 = new StringBuilder("AES/GCM/NoPadding decryption failed: ");
            v4_3.append(v2_7.getMessage());
            throw new com.nimbusds.jose.JOSEException(v4_3.toString(), v2_7);
        }
    }

Method com.nimbusds.jose.crypto.AESGCM.encrypt() calling method javax.crypto.Cipher.getInstance()


    public static com.nimbusds.jose.crypto.AuthenticatedCipherText encrypt(javax.crypto.SecretKey p8, com.nimbusds.jose.util.Container p9, byte[] p10, byte[] p11, java.security.Provider p12)
    {
        com.nimbusds.jose.crypto.AuthenticatedCipherText v2_0;
        javax.crypto.SecretKey v0 = com.nimbusds.jose.util.KeyUtils.toAESKey(p8);
        byte[] v1_1 = ((byte[]) p9.get());
        if (p12 == null) {
            v2_0 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding");
        } else {
            v2_0 = javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p12);
        }
        v2_0.init(1, v0, new javax.crypto.spec.GCMParameterSpec(128, v1_1));
        v2_0.updateAAD(p11);
        try {
            javax.crypto.IllegalBlockSizeException v3_4 = v2_0.doFinal(p10);
            String v5_4 = (v3_4.length - com.nimbusds.jose.util.ByteUtils.byteLength(128));
            String v6_2 = com.nimbusds.jose.util.ByteUtils.subArray(v3_4, 0, v5_4);
            com.nimbusds.jose.JOSEException v4_5 = com.nimbusds.jose.util.ByteUtils.subArray(v3_4, v5_4, com.nimbusds.jose.util.ByteUtils.byteLength(128));
            p9.set(com.nimbusds.jose.crypto.AESGCM.actualIVOf(v2_0));
            return new com.nimbusds.jose.crypto.AuthenticatedCipherText(v6_2, v4_5);
        } catch (javax.crypto.IllegalBlockSizeException v3_5) {
            String v5_6 = new StringBuilder("Couldn\'t encrypt with AES/GCM/NoPadding: ");
            v5_6.append(v3_5.getMessage());
            throw new com.nimbusds.jose.JOSEException(v5_6.toString(), v3_5);
        }
    }

Method com.nimbusds.jose.crypto.AESKW.unwrapCEK() calling method javax.crypto.Cipher.getInstance()


    public static javax.crypto.SecretKey unwrapCEK(javax.crypto.SecretKey p4, byte[] p5, java.security.Provider p6)
    {
        java.security.NoSuchAlgorithmException v0_1;
        if (p6 == null) {
            v0_1 = javax.crypto.Cipher.getInstance("AESWrap");
        } else {
            v0_1 = javax.crypto.Cipher.getInstance("AESWrap", p6);
        }
        v0_1.init(4, com.nimbusds.jose.util.KeyUtils.toAESKey(p4));
        return ((javax.crypto.SecretKey) v0_1.unwrap(p5, "AES", 3));
    }

Method com.nimbusds.jose.crypto.AESKW.wrapCEK() calling method javax.crypto.Cipher.getInstance()


    public static byte[] wrapCEK(javax.crypto.SecretKey p4, javax.crypto.SecretKey p5, java.security.Provider p6)
    {
        java.security.NoSuchAlgorithmException v0_1;
        if (p6 == null) {
            v0_1 = javax.crypto.Cipher.getInstance("AESWrap");
        } else {
            v0_1 = javax.crypto.Cipher.getInstance("AESWrap", p6);
        }
        v0_1.init(3, p5);
        return v0_1.wrap(p4);
    }

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


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

Method com.nimbusds.jose.jca.JCASupport.isSupported() calling method javax.crypto.Cipher.getInstance()


    public static boolean isSupported(com.nimbusds.jose.EncryptionMethod p4, java.security.Provider p5)
    {
        if (!com.nimbusds.jose.EncryptionMethod$Family.AES_CBC_HMAC_SHA.contains(p4)) {
            if (!com.nimbusds.jose.EncryptionMethod$Family.AES_GCM.contains(p4)) {
                return 0;
            } else {
                try {
                    javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p5);
                    return 1;
                } catch (javax.crypto.NoSuchPaddingException v0) {
                    return 0;
                } catch (javax.crypto.NoSuchPaddingException v0) {
                    return 0;
                }
            }
        } else {
            try {
                javax.crypto.NoSuchPaddingException v0_8;
                javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding", p5);
            } catch (javax.crypto.NoSuchPaddingException v0) {
                return 0;
            } catch (javax.crypto.NoSuchPaddingException v0) {
                return 0;
            }
            if (!p4.equals(com.nimbusds.jose.EncryptionMethod.A128CBC_HS256)) {
                if (!p4.equals(com.nimbusds.jose.EncryptionMethod.A192CBC_HS384)) {
                    v0_8 = "HmacSHA512";
                } else {
                    v0_8 = "HmacSHA384";
                }
            } else {
                v0_8 = "HmacSHA256";
            }
            if (p5.getService("KeyGenerator", v0_8) == null) {
                return 0;
            } else {
                return 1;
            }
        }
    }

Method com.nimbusds.jose.jca.JCASupport.isSupported() calling method javax.crypto.Cipher.getInstance()


    public static boolean isSupported(com.nimbusds.jose.JWEAlgorithm p4, java.security.Provider p5)
    {
        if (!com.nimbusds.jose.JWEAlgorithm$Family.RSA.contains(p4)) {
            if (!com.nimbusds.jose.JWEAlgorithm$Family.AES_KW.contains(p4)) {
                if (!com.nimbusds.jose.JWEAlgorithm$Family.ECDH_ES.contains(p4)) {
                    if (!com.nimbusds.jose.JWEAlgorithm$Family.AES_GCM_KW.contains(p4)) {
                        if (!com.nimbusds.jose.JWEAlgorithm$Family.PBES2.contains(p4)) {
                            if (!com.nimbusds.jose.JWEAlgorithm.DIR.equals(p4)) {
                                return 0;
                            } else {
                                return 1;
                            }
                        } else {
                            String v0_14;
                            if (!p4.equals(com.nimbusds.jose.JWEAlgorithm.PBES2_HS256_A128KW)) {
                                if (!p4.equals(com.nimbusds.jose.JWEAlgorithm.PBES2_HS384_A192KW)) {
                                    v0_14 = "HmacSHA512";
                                } else {
                                    v0_14 = "HmacSHA384";
                                }
                            } else {
                                v0_14 = "HmacSHA256";
                            }
                            if (p5.getService("KeyGenerator", v0_14) == null) {
                                return 0;
                            } else {
                                return 1;
                            }
                        }
                    } else {
                        try {
                            javax.crypto.Cipher.getInstance("AES/GCM/NoPadding", p5);
                            return 1;
                        } catch (String v0) {
                            return 0;
                        } catch (String v0) {
                            return 0;
                        }
                    }
                } else {
                    if (p5.getService("KeyAgreement", "ECDH") == null) {
                        return 0;
                    } else {
                        return 1;
                    }
                }
            } else {
                if (p5.getService("Cipher", "AESWrap") == null) {
                    return 0;
                } else {
                    return 1;
                }
            }
        } else {
            String v0_28;
            if (!p4.equals(com.nimbusds.jose.JWEAlgorithm.RSA1_5)) {
                if (!p4.equals(com.nimbusds.jose.JWEAlgorithm.RSA_OAEP)) {
                    if (!p4.equals(com.nimbusds.jose.JWEAlgorithm.RSA_OAEP_256)) {
                        return 0;
                    } else {
                        v0_28 = "RSA/ECB/OAEPWithSHA-256AndMGF1Padding";
                    }
                } else {
                    v0_28 = "RSA/ECB/OAEPWithSHA-1AndMGF1Padding";
                }
            } else {
                v0_28 = "RSA/ECB/PKCS1Padding";
            }
            try {
                javax.crypto.Cipher.getInstance(v0_28, p5);
                return 1;
            } catch (javax.crypto.NoSuchPaddingException v1) {
                return 0;
            } catch (javax.crypto.NoSuchPaddingException v1) {
                return 0;
            }
        }
    }

Method com.google.android.exoplayer2.source.hls.Aes128DataSource.open() calling method javax.crypto.Cipher.getInstance()


    public long open(com.google.android.exoplayer2.upstream.DataSpec p7)
    {
        try {
            java.security.NoSuchAlgorithmException v0_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
            try {
                v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
                java.security.InvalidKeyException v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
                this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
                v3_3.open();
                return -1;
            } catch (java.security.InvalidKeyException v3_4) {
                throw new RuntimeException(v3_4);
            }
        } catch (java.security.NoSuchAlgorithmException v0_1) {
            throw new RuntimeException(v0_1);
        }
        v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
        v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
        this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
        v3_3.open();
        return -1;
    }

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


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

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.decrypt() calling method javax.crypto.Cipher.getInstance()


    public String decrypt(String p17)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p17)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v3_1 = (p17.charAt(0) - 97);
            if (v3_1 <= null) {
                byte[] v4_1 = new Object[1];
                v4_1[0] = Integer.valueOf(v3_1);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v4_1));
            } else {
                if (!p17.substring(1, (v3_1 + 1)).equals("E1")) {
                    String v6_4 = new Object[2];
                    v6_4[0] = p17;
                    v6_4[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v6_4));
                } else {
                    byte[] v4_4 = android.util.Base64.decode(p17.substring((v3_1 + 1)), 0);
                    IllegalArgumentException v5_8 = new String(v4_4, 0, 4, "UTF_8");
                    javax.crypto.SecretKey v9_1 = new StringBuilder();
                    v9_1.append("Encrypt version:");
                    v9_1.append(v5_8);
                    android.util.Log.v("StorageHelper", v9_1.toString());
                    javax.crypto.SecretKey v7_2 = this.getKey(v5_8);
                    javax.crypto.SecretKey v9_3 = this.getHMacKey(v7_2);
                    int v10_3 = ((v4_4.length - 16) - 32);
                    int v12_1 = (v4_4.length - 32);
                    int v13 = (v10_3 - 4);
                    if ((v10_3 < 0) || ((v12_1 < 0) || (v13 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v14_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v15_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v15_1.init(v9_3);
                        v15_1.update(v4_4, 0, v12_1);
                        this.assertHMac(v4_4, v12_1, v4_4.length, v15_1.doFinal());
                        v14_1.init(2, v7_2, new javax.crypto.spec.IvParameterSpec(v4_4, v10_3, 16));
                        String v6_0 = new String(v14_1.doFinal(v4_4, 4, v13), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v6_0;
                    }
                }
            }
        }
    }

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


    public String encrypt(String p13)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p13)) {
            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());
            IllegalArgumentException v0_6 = this.mBlobVersion.getBytes("UTF_8");
            String v1_6 = p13.getBytes("UTF_8");
            byte[] v2_3 = new byte[16];
            this.mRandom.nextBytes(v2_3);
            javax.crypto.spec.IvParameterSpec v3_2 = new javax.crypto.spec.IvParameterSpec(v2_3);
            javax.crypto.Cipher v4_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v5_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v4_1.init(1, this.mKey, v3_2);
            byte[] v6_1 = v4_1.doFinal(v1_6);
            v5_1.init(this.mHMACKey);
            v5_1.update(v0_6);
            v5_1.update(v6_1);
            v5_1.update(v2_3);
            byte[] v7_2 = v5_1.doFinal();
            byte[] v8_4 = new byte[(((v0_6.length + v6_1.length) + v2_3.length) + v7_2.length)];
            System.arraycopy(v0_6, 0, v8_4, 0, v0_6.length);
            System.arraycopy(v6_1, 0, v8_4, v0_6.length, v6_1.length);
            System.arraycopy(v2_3, 0, v8_4, (v0_6.length + v6_1.length), v2_3.length);
            System.arraycopy(v7_2, 0, v8_4, ((v0_6.length + v6_1.length) + v2_3.length), v7_2.length);
            String v9_11 = new String(android.util.Base64.encode(v8_4, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v10_6 = new StringBuilder();
            v10_6.append(this.getEncodeVersionLengthPrefix());
            v10_6.append("E1");
            v10_6.append(v9_11);
            return v10_6.toString();
        }
    }

Method dev.jci.mwp.utils.EncryptionDecryption.decryptString() calling method javax.crypto.Cipher.getInstance()


    public final String decryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "decriptText");
        byte[] v0_2 = android.util.Base64.decode(p7, 0);
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(2, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        byte[] v3_3 = v2_2.doFinal(v0_2);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v3_3, "decrypted");
        return new String(v3_3, kotlin.text.Charsets.UTF_8);
    }

Method dev.jci.mwp.utils.EncryptionDecryption.encryptString() calling method javax.crypto.Cipher.getInstance()


    public final String encryptString(String p7)
    {
        kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(p7, "plainText");
        byte[] v0_2 = p7.getBytes(kotlin.text.Charsets.UTF_8);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v0_2, "(this as java.lang.String).getBytes(charset)");
        javax.crypto.spec.SecretKeySpec v1_0 = new javax.crypto.spec.SecretKeySpec(this.getAESPublicKey(), dev.jci.mwp.constants.Constants.Companion.getAES());
        javax.crypto.Cipher v2_2 = javax.crypto.Cipher.getInstance(dev.jci.mwp.constants.Constants.Companion.getAES_ALGORITH());
        v2_2.init(1, ((java.security.Key) v1_0), ((java.security.spec.AlgorithmParameterSpec) this.generateIV()));
        String v4_3 = android.util.Base64.encodeToString(v2_2.doFinal(v0_2), 0);
        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v4_3, "Base64.encodeToString(encrypted, Base64.DEFAULT)");
        return v4_3;
    }

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


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

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


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

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


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

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


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

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


    public static com.nimbusds.jose.jwk.ECKey load(java.security.KeyStore p7, String p8, char[] p9)
    {
        java.security.cert.Certificate v0 = p7.getCertificate(p8);
        if ((v0 != null) && ((v0 instanceof java.security.cert.X509Certificate))) {
            java.security.cert.X509Certificate v1_2 = ((java.security.cert.X509Certificate) v0);
            if (!(v1_2.getPublicKey() instanceof java.security.interfaces.ECPublicKey)) {
                throw new com.nimbusds.jose.JOSEException("Couldn\'t load EC JWK: The key algorithm is not EC");
            } else {
                com.nimbusds.jose.JOSEException v2_3 = new com.nimbusds.jose.jwk.ECKey$Builder(com.nimbusds.jose.jwk.ECKey.parse(v1_2)).keyID(p8).keyStore(p7).build();
                try {
                    java.security.UnrecoverableKeyException v3_5 = p7.getKey(p8, p9);
                } catch (java.security.UnrecoverableKeyException v3_6) {
                    java.security.PrivateKey v5_1 = new StringBuilder("Couldn\'t retrieve private EC key (bad pin?): ");
                    v5_1.append(v3_6.getMessage());
                    throw new com.nimbusds.jose.JOSEException(v5_1.toString(), v3_6);
                }
                if (!(v3_5 instanceof java.security.interfaces.ECPrivateKey)) {
                    if ((!(v3_5 instanceof java.security.PrivateKey)) || (!"EC".equalsIgnoreCase(v3_5.getAlgorithm()))) {
                        return v2_3;
                    } else {
                        return new com.nimbusds.jose.jwk.ECKey$Builder(v2_3).privateKey(((java.security.PrivateKey) v3_5)).build();
                    }
                } else {
                    return new com.nimbusds.jose.jwk.ECKey$Builder(v2_3).privateKey(((java.security.interfaces.ECPrivateKey) v3_5)).build();
                }
            }
        } else {
            return 0;
        }
    }

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


    public static com.nimbusds.jose.jwk.RSAKey load(java.security.KeyStore p7, String p8, char[] p9)
    {
        java.security.cert.Certificate v0 = p7.getCertificate(p8);
        if ((v0 != null) && ((v0 instanceof java.security.cert.X509Certificate))) {
            java.security.cert.X509Certificate v1_2 = ((java.security.cert.X509Certificate) v0);
            if (!(v1_2.getPublicKey() instanceof java.security.interfaces.RSAPublicKey)) {
                throw new com.nimbusds.jose.JOSEException("Couldn\'t load RSA JWK: The key algorithm is not RSA");
            } else {
                com.nimbusds.jose.JOSEException v2_3 = new com.nimbusds.jose.jwk.RSAKey$Builder(com.nimbusds.jose.jwk.RSAKey.parse(v1_2)).keyID(p8).keyStore(p7).build();
                try {
                    java.security.UnrecoverableKeyException v3_5 = p7.getKey(p8, p9);
                } catch (java.security.UnrecoverableKeyException v3_6) {
                    java.security.PrivateKey v5_1 = new StringBuilder("Couldn\'t retrieve private RSA key (bad pin?): ");
                    v5_1.append(v3_6.getMessage());
                    throw new com.nimbusds.jose.JOSEException(v5_1.toString(), v3_6);
                }
                if (!(v3_5 instanceof java.security.interfaces.RSAPrivateKey)) {
                    if ((!(v3_5 instanceof java.security.PrivateKey)) || (!"RSA".equalsIgnoreCase(v3_5.getAlgorithm()))) {
                        return v2_3;
                    } else {
                        return new com.nimbusds.jose.jwk.RSAKey$Builder(v2_3).privateKey(((java.security.PrivateKey) v3_5)).build();
                    }
                } else {
                    return new com.nimbusds.jose.jwk.RSAKey$Builder(v2_3).privateKey(((java.security.interfaces.RSAPrivateKey) v3_5)).build();
                }
            }
        } else {
            return 0;
        }
    }

Method com.google.android.exoplayer2.upstream.cache.CachedContentIndex.readFile() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private boolean readFile()
    {
        try {
            java.io.IOException v2_1 = new java.io.BufferedInputStream(this.atomicFile.openRead());
            java.io.DataInputStream v0 = new java.io.DataInputStream(v2_1);
            int v3_0 = v0.readInt();
        } catch (Throwable v1_1) {
            if (v0 != null) {
                com.google.android.exoplayer2.util.Util.closeQuietly(v0);
            }
            throw v1_1;
        } catch (java.io.IOException v2) {
            if (v0 != null) {
                com.google.android.exoplayer2.util.Util.closeQuietly(v0);
            }
            return 0;
        }
        if (v3_0 >= 0) {
            if (v3_0 <= 2) {
                if ((v0.readInt() & 1) == 0) {
                    if (this.encrypt) {
                        this.changed = 1;
                    }
                } else {
                    if (this.cipher != null) {
                        int v6_3 = new byte[16];
                        v0.readFully(v6_3);
                        this.cipher.init(2, this.secretKeySpec, new javax.crypto.spec.IvParameterSpec(v6_3));
                        v0 = new java.io.DataInputStream(new javax.crypto.CipherInputStream(v2_1, this.cipher));
                    } else {
                        com.google.android.exoplayer2.util.Util.closeQuietly(v0);
                        return 0;
                    }
                }
                java.io.DataInputStream v4_5 = v0.readInt();
                int v8_2 = 0;
                int v6_5 = 0;
                while (v6_5 < v4_5) {
                    Throwable v9_5 = com.google.android.exoplayer2.upstream.cache.CachedContent.readFromStream(v3_0, v0);
                    this.add(v9_5);
                    v8_2 += v9_5.headerHashCode(v3_0);
                    v6_5++;
                }
                Throwable v9_4;
                int v6_6 = v0.readInt();
                if (v0.read() != -1) {
                    v9_4 = 0;
                } else {
                    v9_4 = 1;
                }
                if ((v6_6 == v8_2) && (v9_4 != null)) {
                    com.google.android.exoplayer2.util.Util.closeQuietly(v0);
                    return 1;
                } else {
                    com.google.android.exoplayer2.util.Util.closeQuietly(v0);
                    return 0;
                }
            } else {
            }
        }
        com.google.android.exoplayer2.util.Util.closeQuietly(v0);
        return 0;
    }

Method com.google.android.exoplayer2.upstream.cache.CachedContentIndex.writeFile() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private void writeFile()
    {
        int v0_0 = 0;
        try {
            java.io.IOException v1_1 = this.atomicFile.startWrite();
        } catch (java.io.IOException v1_3) {
            com.google.android.exoplayer2.util.Util.closeQuietly(v0_0);
            throw v1_3;
        } catch (java.io.IOException v1_2) {
            throw new com.google.android.exoplayer2.upstream.cache.Cache$CacheException(v1_2);
        }
        if (this.bufferedOutputStream != null) {
            this.bufferedOutputStream.reset(v1_1);
        } else {
            this.bufferedOutputStream = new com.google.android.exoplayer2.util.ReusableBufferedOutputStream(v1_1);
        }
        v0_0 = new java.io.DataOutputStream(this.bufferedOutputStream);
        v0_0.writeInt(2);
        v0_0.writeInt(this.encrypt);
        if (this.encrypt) {
            int v4_2 = new byte[16];
            new java.util.Random().nextBytes(v4_2);
            v0_0.write(v4_2);
            this.cipher.init(1, this.secretKeySpec, new javax.crypto.spec.IvParameterSpec(v4_2));
            v0_0.flush();
            v0_0 = new java.io.DataOutputStream(new javax.crypto.CipherOutputStream(this.bufferedOutputStream, this.cipher));
        }
        v0_0.writeInt(this.keyToContent.size());
        int v4_5 = 0;
        java.util.Iterator v5_6 = this.keyToContent.values().iterator();
        while (v5_6.hasNext()) {
            com.google.android.exoplayer2.upstream.cache.CachedContent v6_7 = ((com.google.android.exoplayer2.upstream.cache.CachedContent) v5_6.next());
            v6_7.writeToStream(v0_0);
            v4_5 += v6_7.headerHashCode(2);
        }
        v0_0.writeInt(v4_5);
        this.atomicFile.endWrite(v0_0);
        com.google.android.exoplayer2.util.Util.closeQuietly(0);
        return;
    }

Method com.google.android.exoplayer2.upstream.crypto.AesFlushingCipher.<init>() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public AesFlushingCipher(int p9, byte[] p10, long p11, long p13)
    {
        try {
            this.cipher = javax.crypto.Cipher.getInstance("AES/CTR/NoPadding");
            this.blockSize = this.cipher.getBlockSize();
            java.security.NoSuchAlgorithmException v0_1 = new byte[this.blockSize];
            this.zerosBlock = v0_1;
            java.security.NoSuchAlgorithmException v0_3 = new byte[this.blockSize];
            this.flushedBlock = v0_3;
            int v2_3 = ((int) (p13 % ((long) this.blockSize)));
            this.cipher.init(p9, new javax.crypto.spec.SecretKeySpec(p10, com.google.android.exoplayer2.util.Util.splitAtFirst(this.cipher.getAlgorithm(), "/")[0]), new javax.crypto.spec.IvParameterSpec(this.getInitializationVector(p11, (p13 / ((long) this.blockSize)))));
        } catch (java.security.NoSuchAlgorithmException v0_8) {
            throw new RuntimeException(v0_8);
        }
        if (v2_3 != 0) {
            byte[] v3_1 = new byte[v2_3];
            this.updateInPlace(v3_1, 0, v2_3);
        }
        return;
    }

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


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

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


    public String encrypt(String p14)
    {
        com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Starting encryption");
        if (com.microsoft.aad.adal.StringExtensions.isNullOrBlank(p14)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            this.mKey = this.loadSecretKeyForEncryption();
            this.mHMACKey = this.getHMacKey(this.mKey);
            byte[] v3_1 = new StringBuilder();
            v3_1.append("Encrypt version:");
            v3_1.append(this.mBlobVersion);
            com.microsoft.aad.adal.Logger.i("StorageHelper:encrypt", "", v3_1.toString());
            IllegalArgumentException v1_6 = this.mBlobVersion.getBytes("UTF_8");
            String v2_4 = p14.getBytes("UTF_8");
            byte[] v3_4 = new byte[16];
            this.mRandom.nextBytes(v3_4);
            javax.crypto.spec.IvParameterSpec v4_4 = new javax.crypto.spec.IvParameterSpec(v3_4);
            javax.crypto.Cipher v5_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v6_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v5_1.init(1, this.mKey, v4_4);
            byte[] v7_1 = v5_1.doFinal(v2_4);
            v6_1.init(this.mHMACKey);
            v6_1.update(v1_6);
            v6_1.update(v7_1);
            v6_1.update(v3_4);
            byte[] v8_2 = v6_1.doFinal();
            byte[] v9_4 = new byte[(((v1_6.length + v7_1.length) + v3_4.length) + v8_2.length)];
            System.arraycopy(v1_6, 0, v9_4, 0, v1_6.length);
            System.arraycopy(v7_1, 0, v9_4, v1_6.length, v7_1.length);
            System.arraycopy(v3_4, 0, v9_4, (v1_6.length + v7_1.length), v3_4.length);
            System.arraycopy(v8_2, 0, v9_4, ((v1_6.length + v7_1.length) + v3_4.length), v8_2.length);
            String v10_11 = new String(android.util.Base64.encode(v9_4, 2), "UTF_8");
            com.microsoft.aad.adal.Logger.v("StorageHelper:encrypt", "Finished encryption");
            String v11_6 = new StringBuilder();
            v11_6.append(this.getEncodeVersionLengthPrefix());
            v11_6.append("E1");
            v11_6.append(v10_11);
            return v11_6.toString();
        }
    }

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


    private static javax.crypto.Cipher createAESCBCCipher(javax.crypto.SecretKey p4, boolean p5, byte[] p6, java.security.Provider p7)
    {
        try {
            Exception v0_2 = com.nimbusds.jose.crypto.CipherHelper.getInstance("AES/CBC/PKCS5Padding", p7);
            com.nimbusds.jose.JOSEException v1_3 = new javax.crypto.spec.SecretKeySpec(p4.getEncoded(), "AES");
            String v2_3 = new javax.crypto.spec.IvParameterSpec(p6);
        } catch (Exception v0_1) {
            throw new com.nimbusds.jose.JOSEException(v0_1.getMessage(), v0_1);
        }
        if (!p5) {
            v0_2.init(2, v1_3, v2_3);
        } else {
            v0_2.init(1, v1_3, v2_3);
        }
        return v0_2;
    }

Method com.google.android.exoplayer2.source.hls.Aes128DataSource.open() calling method javax.crypto.spec.IvParameterSpec.<init>()


    public long open(com.google.android.exoplayer2.upstream.DataSpec p7)
    {
        try {
            java.security.NoSuchAlgorithmException v0_2 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS7Padding");
            try {
                v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
                java.security.InvalidKeyException v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
                this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
                v3_3.open();
                return -1;
            } catch (java.security.InvalidKeyException v3_4) {
                throw new RuntimeException(v3_4);
            }
        } catch (java.security.NoSuchAlgorithmException v0_1) {
            throw new RuntimeException(v0_1);
        }
        v0_2.init(2, new javax.crypto.spec.SecretKeySpec(this.encryptionKey, "AES"), new javax.crypto.spec.IvParameterSpec(this.encryptionIv));
        v3_3 = new com.google.android.exoplayer2.upstream.DataSourceInputStream(this.upstream, p7);
        this.cipherInputStream = new javax.crypto.CipherInputStream(v3_3, v0_2);
        v3_3.open();
        return -1;
    }

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


    public String decrypt(String p17)
    {
        android.util.Log.v("StorageHelper", "Starting decryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p17)) {
            throw new IllegalArgumentException("Input is empty or null");
        } else {
            String v3_1 = (p17.charAt(0) - 97);
            if (v3_1 <= null) {
                byte[] v4_1 = new Object[1];
                v4_1[0] = Integer.valueOf(v3_1);
                throw new IllegalArgumentException(String.format("Encode version length: \'%s\' is not valid, it must be greater of equal to 0", v4_1));
            } else {
                if (!p17.substring(1, (v3_1 + 1)).equals("E1")) {
                    String v6_4 = new Object[2];
                    v6_4[0] = p17;
                    v6_4[1] = "E1";
                    throw new IllegalArgumentException(String.format("Encode version received was: \'%s\', Encode version supported is: \'%s\'", v6_4));
                } else {
                    byte[] v4_4 = android.util.Base64.decode(p17.substring((v3_1 + 1)), 0);
                    IllegalArgumentException v5_8 = new String(v4_4, 0, 4, "UTF_8");
                    javax.crypto.SecretKey v9_1 = new StringBuilder();
                    v9_1.append("Encrypt version:");
                    v9_1.append(v5_8);
                    android.util.Log.v("StorageHelper", v9_1.toString());
                    javax.crypto.SecretKey v7_2 = this.getKey(v5_8);
                    javax.crypto.SecretKey v9_3 = this.getHMacKey(v7_2);
                    int v10_3 = ((v4_4.length - 16) - 32);
                    int v12_1 = (v4_4.length - 32);
                    int v13 = (v10_3 - 4);
                    if ((v10_3 < 0) || ((v12_1 < 0) || (v13 < 0))) {
                        throw new java.io.IOException("Invalid byte array input for decryption.");
                    } else {
                        javax.crypto.Cipher v14_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
                        javax.crypto.Mac v15_1 = javax.crypto.Mac.getInstance("HmacSHA256");
                        v15_1.init(v9_3);
                        v15_1.update(v4_4, 0, v12_1);
                        this.assertHMac(v4_4, v12_1, v4_4.length, v15_1.doFinal());
                        v14_1.init(2, v7_2, new javax.crypto.spec.IvParameterSpec(v4_4, v10_3, 16));
                        String v6_0 = new String(v14_1.doFinal(v4_4, 4, v13), "UTF_8");
                        android.util.Log.v("StorageHelper", "Finished decryption");
                        return v6_0;
                    }
                }
            }
        }
    }

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


    public String encrypt(String p13)
    {
        android.util.Log.v("StorageHelper", "Starting encryption");
        if (com.microsoft.identity.common.adal.internal.util.StringExtensions.isNullOrBlank(p13)) {
            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());
            IllegalArgumentException v0_6 = this.mBlobVersion.getBytes("UTF_8");
            String v1_6 = p13.getBytes("UTF_8");
            byte[] v2_3 = new byte[16];
            this.mRandom.nextBytes(v2_3);
            javax.crypto.spec.IvParameterSpec v3_2 = new javax.crypto.spec.IvParameterSpec(v2_3);
            javax.crypto.Cipher v4_1 = javax.crypto.Cipher.getInstance("AES/CBC/PKCS5Padding");
            javax.crypto.Mac v5_1 = javax.crypto.Mac.getInstance("HmacSHA256");
            v4_1.init(1, this.mKey, v3_2);
            byte[] v6_1 = v4_1.doFinal(v1_6);
            v5_1.init(this.mHMACKey);
            v5_1.update(v0_6);
            v5_1.update(v6_1);
            v5_1.update(v2_3);
            byte[] v7_2 = v5_1.doFinal();
            byte[] v8_4 = new byte[(((v0_6.length + v6_1.length) + v2_3.length) + v7_2.length)];
            System.arraycopy(v0_6, 0, v8_4, 0, v0_6.length);
            System.arraycopy(v6_1, 0, v8_4, v0_6.length, v6_1.length);
            System.arraycopy(v2_3, 0, v8_4, (v0_6.length + v6_1.length), v2_3.length);
            System.arraycopy(v7_2, 0, v8_4, ((v0_6.length + v6_1.length) + v2_3.length), v7_2.length);
            String v9_11 = new String(android.util.Base64.encode(v8_4, 2), "UTF_8");
            android.util.Log.v("StorageHelper", "Finished encryption");
            String v10_6 = new StringBuilder();
            v10_6.append(this.getEncodeVersionLengthPrefix());
            v10_6.append("E1");
            v10_6.append(v9_11);
            return v10_6.toString();
        }
    }

Method dev.jci.mwp.utils.EncryptionDecryption.generateIV() calling method javax.crypto.spec.IvParameterSpec.<init>()


    private final javax.crypto.spec.IvParameterSpec generateIV()
    {
        byte[] v0_1 = new byte[16];
        return new javax.crypto.spec.IvParameterSpec(v0_1);
    }