Info Call to Random API

Description

List of all calls to methods that return pseudo-random values.

Recommendation

Do not seed Random with the current time because that value is more predictable to an attacker than the default seed.

The java.util.Random class must not be used either for security-critical applications or for protecting sensitive data. Use a more secure random number generator, such as the java.security.SecureRandom class.

Technical details

Method org.java_websocket.drafts.Draft_76.generateKey() calling method java.util.Random.<init>()


    private static String generateKey()
    {
        java.util.Random v4_1 = new java.util.Random();
        long v6 = ((long) (v4_1.nextInt(12) + 1));
        int v2_3 = Long.toString((((long) (v4_1.nextInt(Math.abs(new Long((2.1219957905e-314 / v6)).intValue())) + 1)) * v6));
        int v5_1 = (v4_1.nextInt(12) + 1);
        StringBuilder v3_0 = 0;
        while (v3_0 < v5_1) {
            int v8 = Math.abs(v4_1.nextInt(v2_3.length()));
            int v0_13 = ((char) (v4_1.nextInt(95) + 33));
            if ((v0_13 >= 48) && (v0_13 <= 57)) {
                v0_13 = ((char) (v0_13 - 15));
            }
            v2_3 = new StringBuilder(v2_3).insert(v8, v0_13).toString();
            v3_0++;
        }
        int v0_6 = 0;
        String v1_1 = v2_3;
        while (((long) v0_6) < v6) {
            v1_1 = new StringBuilder(v1_1).insert(Math.abs((v4_1.nextInt((v1_1.length() - 1)) + 1)), " ").toString();
            v0_6++;
        }
        return v1_1;
    }

Method org.java_websocket.drafts.Draft_76.<init>() calling method java.util.Random.<init>()


    public Draft_76()
    {
        this.failed = 0;
        this.reuseableRandom = new java.util.Random();
        return;
    }

Method org.java_websocket.drafts.Draft_75.<init>() calling method java.util.Random.<init>()


    public Draft_75()
    {
        this.readingState = 0;
        this.readyframes = new java.util.LinkedList();
        this.reuseableRandom = new java.util.Random();
        return;
    }

Method org.java_websocket.drafts.Draft_10.<init>() calling method java.util.Random.<init>()


    public Draft_10()
    {
        this.fragmentedframe = 0;
        this.reuseableRandom = new java.util.Random();
        return;
    }

Method net.hockeyapp.android.utils.SimpleMultipartEntity.<init>() calling method java.util.Random.<init>()


    public SimpleMultipartEntity()
    {
        this.mIsSetFirst = 0;
        this.mIsSetLast = 0;
        this.mOut = new java.io.ByteArrayOutputStream();
        StringBuffer v0_1 = new StringBuffer();
        java.util.Random v2_0 = new java.util.Random();
        int v1 = 0;
        while (v1 < 30) {
            v0_1.append(net.hockeyapp.android.utils.SimpleMultipartEntity.BOUNDARY_CHARS[v2_0.nextInt(net.hockeyapp.android.utils.SimpleMultipartEntity.BOUNDARY_CHARS.length)]);
            v1++;
        }
        this.mBoundary = v0_1.toString();
        return;
    }

Method com.google.firebase.iid.zzf.zzeB() calling method java.util.Random.<init>()


    private void zzeB(String p5)
    {
        if ("com.google.android.gsf".equals(com.google.firebase.iid.zzf.zzaUq)) {
            this.zzaUz = (this.zzaUz + 1);
            if (this.zzaUz >= 3) {
                if (this.zzaUz == 3) {
                    this.zzaUA = (new java.util.Random().nextInt(1000) + 1000);
                }
                this.zzaUA = (this.zzaUA * 2);
                this.zzaUB = (android.os.SystemClock.elapsedRealtime() + ((long) this.zzaUA));
                android.util.Log.w("InstanceID/Rpc", new StringBuilder((String.valueOf(p5).length() + 31)).append("Backoff due to ").append(p5).append(" for ").append(this.zzaUA).toString());
            }
        }
        return;
    }

Method com.google.android.gms.internal.zzak.zzU() calling method java.util.Random.<init>()


    private static java.util.Random zzU()
    {
        if (com.google.android.gms.internal.zzak.zznR == null) {
            if (com.google.android.gms.internal.zzak.zznR == null) {
                com.google.android.gms.internal.zzak.zznR = new java.util.Random();
            }
        }
        return com.google.android.gms.internal.zzak.zznR;
    }

Method com.google.android.gms.internal.zzajk.<clinit>() calling method java.util.Random.<init>()


    static zzajk()
    {
        com.google.android.gms.internal.zzajk.zzbVF = new com.google.android.gms.internal.zzajn();
        com.google.android.gms.internal.zzajk.zzacm = new com.google.android.gms.common.util.zzh();
        com.google.android.gms.internal.zzajk.zzbBM = new java.util.Random();
        return;
    }

Method com.google.android.gms.internal.zzaiu.<clinit>() calling method java.util.Random.<init>()


    static zzaiu()
    {
        int[] v0_5;
        if (com.google.android.gms.internal.zzaiu.desiredAssertionStatus()) {
            v0_5 = 0;
        } else {
            v0_5 = 1;
        }
        com.google.android.gms.internal.zzaiu.$assertionsDisabled = v0_5;
        com.google.android.gms.internal.zzaiu.zzbSl = new java.util.Random();
        com.google.android.gms.internal.zzaiu.zzbSm = 0;
        int[] v0_3 = new int[12];
        com.google.android.gms.internal.zzaiu.zzbSn = v0_3;
        return;
    }

Method com.google.android.gms.internal.zzaik.<init>() calling method java.util.Random.<init>()


    zzaik(com.google.android.gms.internal.zzaie p5, String p6, int p7)
    {
        this.zzbKN = new java.util.Random();
        this.zzbSa = 0;
        this.zzbSc = 0;
        this.zzbRG = com.google.android.gms.internal.zzaie.getThreadFactory().newThread(new com.google.android.gms.internal.zzaik$1(this));
        com.google.android.gms.internal.zzaie.zzTR().zza(this.zzTY(), new StringBuilder((String.valueOf(p6).length() + 18)).append(p6).append("Writer-").append(p7).toString());
        this.zzbRX = p5;
        this.zzbSb = new java.util.concurrent.LinkedBlockingQueue();
        return;
    }

Method com.google.android.gms.internal.zzaeo.<init>() calling method java.util.Random.<init>()


    private zzaeo(java.util.concurrent.ScheduledExecutorService p2, com.google.android.gms.internal.zzahf p3, long p4, long p6, double p8, double p10)
    {
        this.zzbKN = new java.util.Random();
        this.zzbKQ = 1;
        this.zzbHI = p2;
        this.zzbHV = p3;
        this.zzbKJ = p4;
        this.zzbKK = p6;
        this.zzbKM = p8;
        this.zzbKL = p10;
        return;
    }

Method com.google.android.gms.iid.zzc.zzeB() calling method java.util.Random.<init>()


    private void zzeB(String p5)
    {
        if ("com.google.android.gsf".equals(com.google.android.gms.iid.zzc.zzaUq)) {
            this.zzaUz = (this.zzaUz + 1);
            if (this.zzaUz >= 3) {
                if (this.zzaUz == 3) {
                    this.zzaUA = (new java.util.Random().nextInt(1000) + 1000);
                }
                this.zzaUA = (this.zzaUA * 2);
                this.zzaUB = (android.os.SystemClock.elapsedRealtime() + ((long) this.zzaUA));
                android.util.Log.w("InstanceID/Rpc", new StringBuilder((String.valueOf(p5).length() + 31)).append("Backoff due to ").append(p5).append(" for ").append(this.zzaUA).toString());
            }
        }
        return;
    }

Method com.google.android.gms.analytics.Tracker.<init>() calling method java.util.Random.<init>()


    Tracker(com.google.android.gms.analytics.internal.zzf p5, String p6, com.google.android.gms.analytics.internal.zzad p7)
    {
        super(p5);
        super.zzAd = new java.util.HashMap();
        super.zzUL = new java.util.HashMap();
        if (p6 != null) {
            super.zzAd.put("&tid", p6);
        }
        super.zzAd.put("useSecure", "1");
        super.zzAd.put("&a", Integer.toString((new java.util.Random().nextInt(2147483647) + 1)));
        if (p7 != null) {
            super.zzUM = p7;
        } else {
            super.zzUM = new com.google.android.gms.analytics.internal.zzad("tracking", super.zzlQ());
        }
        super.zzUN = new com.google.android.gms.analytics.Tracker$zza(super, p5);
        return;
    }

Method com.google.android.gms.ads.internal.client.zzn.<init>() calling method java.util.Random.<init>()


    public zzn()
    {
        this.zzpp = new Object();
        this.zzvQ = new java.util.Random();
        this.zzdS();
        return;
    }

Method com.deniz.views.wheelview.MaterialColor.<clinit>() calling method java.util.Random.<init>()


    static MaterialColor()
    {
        com.deniz.views.wheelview.MaterialColor.sRandom = new java.util.Random();
        com.deniz.views.wheelview.MaterialColor.sColorPattern = java.util.regex.Pattern.compile("_[aA]?+\\d+");
        return;
    }

Method com.deniz.dijitaldeniz.wallet.factories.FactoryWalletCard$1.run() calling method java.util.Random.<init>()


    public void run()
    {
        java.util.ArrayList v1_1 = new java.util.ArrayList();
        int v0 = 0;
        while (v0 < 30) {
            new java.util.Random();
            if ((v0 % 2) != 0) {
                v1_1.add(new com.deniz.dijitaldeniz.wallet.models.WalletCardModel("http://www.vipkartvizit.com/upload/kartvizit/buyuk/2174-ar-favori_kartvizit_09.jpg", "http://www.vipkartvizit.com/upload/kartvizit/buyuk/2174-ar-favori_kartvizit_09.jpg", "http://www.vipkartvizit.com/upload/kartvizit/buyuk/2174-ar-favori_kartvizit_09.jpg"));
            } else {
                v1_1.add(new com.deniz.dijitaldeniz.wallet.models.WalletCardModel("https://www.visainfinite.ca/infinite/img/vi_card.png", "https://www.visainfinite.ca/infinite/img/vi_card.png?t=123", "https://www.visainfinite.ca/infinite/img/vi_card.png?t=32523423"));
            }
            v0++;
        }
        if (this.val$listener != null) {
            this.val$listener.onCompleted(v1_1);
        }
        return;
    }

Method com.deniz.dijitaldeniz.helper.volley.VPRequestF.<init>() calling method java.util.Random.<init>()


    public VPRequestF(String p15, String p16, String p17, com.deniz.dijitaldeniz.service.listeners.FactoryResultListener p18)
    {
        this.cryptedBody = "";
        try {
            com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.allowPinnedCertificates();
            com.deniz.dijitaldeniz.helper.volley.VPRequestF$3 v1_0 = new com.deniz.dijitaldeniz.helper.volley.VPRequestF$3(this, 1, p15, new com.deniz.dijitaldeniz.helper.volley.VPRequestF$1(this, p18), new com.deniz.dijitaldeniz.helper.volley.VPRequestF$2(this, p18), p16, p17);
            com.deniz.dijitaldeniz.helper.volley.AppController.getInstance().addToRequestQueue(v1_0, new StringBuilder().append("StringRequest").append(String.valueOf(((new java.util.Random().nextInt() % 10) + 1))).toString());
            v1_0.setRetryPolicy(new com.android.volley.DefaultRetryPolicy(40000, 1, 1065353216));
            return;
        } catch (Exception v9) {
            throw new RuntimeException("SSL Pinning unsuccessful");
        }
    }

Method com.deniz.dijitaldeniz.helper.volley.VPRequest.callService() calling method java.util.Random.<init>()


    private void callService(String p16, String p17, com.deniz.dijitaldeniz.helper.volley.VPRequestInterface p18, String p19, String p20)
    {
        this.requestInterface = p18;
        try {
            com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.allowPinnedCertificates();
            com.deniz.dijitaldeniz.helper.volley.VPRequest$3 v1_0 = new com.deniz.dijitaldeniz.helper.volley.VPRequest$3(this, 1, p16, new com.deniz.dijitaldeniz.helper.volley.VPRequest$1(this, p18), new com.deniz.dijitaldeniz.helper.volley.VPRequest$2(this, p18), p17, p19, p20);
            com.deniz.dijitaldeniz.helper.volley.AppController.getInstance().addToRequestQueue(v1_0, new StringBuilder().append("StringRequest").append(String.valueOf(((new java.util.Random().nextInt() % 10) + 1))).toString());
            v1_0.setRetryPolicy(new com.android.volley.DefaultRetryPolicy(1440000, 1, 1065353216));
            return;
        } catch (Exception v10) {
            throw new RuntimeException("SSL Pinning unsuccessful");
        }
    }

Method com.deniz.dijitaldeniz.helper.AppMethods.GenerateRandomKey() calling method java.util.Random.<init>()


    public static String GenerateRandomKey()
    {
        char[] v1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toCharArray();
        StringBuilder v5_1 = new StringBuilder();
        java.util.Random v4_1 = new java.util.Random();
        int v2 = 0;
        while (v2 < 32) {
            v5_1.append(v1[v4_1.nextInt(v1.length)]);
            v2++;
        }
        return v5_1.toString();
    }

Method com.deniz.dijitaldeniz.banking.consumerloans.ConsumerLoansApplyChild1Fragment.fillCreditPaymentTable() calling method java.util.Random.<init>()


    public void fillCreditPaymentTable(org.json.JSONObject p4)
    {
        this.inflateEditRow((new java.util.Random().nextInt(100) + 1), p4);
        return;
    }

Method com.crashlytics.android.answers.RandomBackoff.<init>() calling method java.util.Random.<init>()


    public RandomBackoff(io.fabric.sdk.android.services.concurrency.internal.Backoff p3, double p4)
    {
        this(p3, p4, new java.util.Random());
        return;
    }

Method com.android.volley.toolbox.multipart.Boundary.generateBoundary() calling method java.util.Random.<init>()


    private static String generateBoundary()
    {
        java.util.Random v3_1 = new java.util.Random();
        int v1 = (v3_1.nextInt(11) + 30);
        StringBuilder v0_1 = new StringBuilder(v1);
        int v2 = 0;
        while (v2 < v1) {
            v0_1.append(com.android.volley.toolbox.multipart.Boundary.MULTIPART_CHARS[v3_1.nextInt(com.android.volley.toolbox.multipart.Boundary.MULTIPART_CHARS.length)]);
            v2++;
        }
        return v0_1.toString();
    }

Method com.google.android.gms.measurement.internal.zzt.zzFN() calling method java.security.SecureRandom.<init>()


    private java.security.SecureRandom zzFN()
    {
        this.zzkN();
        if (this.zzbdO == null) {
            this.zzbdO = new java.security.SecureRandom();
        }
        return this.zzbdO;
    }

Method com.google.android.gms.wearable.PutDataRequest.<clinit>() calling method java.security.SecureRandom.<init>()


    static PutDataRequest()
    {
        com.google.android.gms.wearable.PutDataRequest.CREATOR = new com.google.android.gms.wearable.zzh();
        com.google.android.gms.wearable.PutDataRequest.zzbBL = java.util.concurrent.TimeUnit.MINUTES.toMillis(30);
        com.google.android.gms.wearable.PutDataRequest.zzbBM = new java.security.SecureRandom();
        return;
    }

Method com.google.android.gms.internal.zzai.zzb() calling method java.security.SecureRandom.<init>()


    private static byte[] zzb(byte[] p5, String p6, boolean p7)
    {
        int v0_3 = com.google.android.gms.internal.zzai.zza(p7);
        if (p5.length > v0_3) {
            p5 = com.google.android.gms.internal.zzamj.toByteArray(com.google.android.gms.internal.zzai.zzb(4096));
        }
        int v0_5;
        if (p5.length >= v0_3) {
            v0_5 = java.nio.ByteBuffer.allocate((v0_3 + 1)).put(((byte) p5.length)).put(p5).array();
        } else {
            byte[] v1_5 = new byte[(v0_3 - p5.length)];
            new java.security.SecureRandom().nextBytes(v1_5);
            v0_5 = java.nio.ByteBuffer.allocate((v0_3 + 1)).put(((byte) p5.length)).put(p5).put(v1_5).array();
        }
        if (p7) {
            v0_5 = java.nio.ByteBuffer.allocate(256).put(com.google.android.gms.internal.zzai.zze(v0_5)).put(v0_5).array();
        }
        byte[] v1_9 = new byte[256];
        new com.google.android.gms.internal.zzaj().zzb(v0_5, v1_9);
        if ((p6 != null) && (p6.length() > 0)) {
            com.google.android.gms.internal.zzai.zza(p6, v1_9);
        }
        return v1_9;
    }

Method com.google.android.gms.auth.api.credentials.PasswordSpecification.<init>() calling method java.security.SecureRandom.<init>()


    PasswordSpecification(int p2, String p3, java.util.List p4, java.util.List p5, int p6, int p7)
    {
        this.mVersionCode = p2;
        this.zzabN = p3;
        this.zzabO = java.util.Collections.unmodifiableList(p4);
        this.zzabP = java.util.Collections.unmodifiableList(p5);
        this.zzabQ = p6;
        this.zzabR = p7;
        this.zzabS = this.zzoY();
        this.zzvQ = new java.security.SecureRandom();
        return;
    }

Method com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.allowAllSSL() calling method java.security.SecureRandom.<init>()


    public static void allowAllSSL()
    {
        javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager$1());
        if (com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.trustManagers == null) {
            javax.net.ssl.SSLSocketFactory v2_7 = new javax.net.ssl.TrustManager[1];
            v2_7[0] = new com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager();
            com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.trustManagers = v2_7;
        }
        try {
            javax.net.ssl.SSLContext v0 = javax.net.ssl.SSLContext.getInstance("TLS");
            v0.init(0, com.deniz.dijitaldeniz.helper.volley.HttpsTrustManager.trustManagers, new java.security.SecureRandom());
        } catch (java.security.KeyManagementException v1_1) {
            v1_1.printStackTrace();
        } catch (java.security.KeyManagementException v1_0) {
            v1_0.printStackTrace();
        }
        javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(v0.getSocketFactory());
        return;
    }

Method com.deniz.dijitaldeniz.helper.HttpsTrustManager.allowAllSSL() calling method java.security.SecureRandom.<init>()


    public static void allowAllSSL()
    {
        javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new com.deniz.dijitaldeniz.helper.HttpsTrustManager$1());
        if (com.deniz.dijitaldeniz.helper.HttpsTrustManager.trustManagers == null) {
            javax.net.ssl.SSLSocketFactory v2_7 = new javax.net.ssl.TrustManager[1];
            v2_7[0] = new com.deniz.dijitaldeniz.helper.HttpsTrustManager();
            com.deniz.dijitaldeniz.helper.HttpsTrustManager.trustManagers = v2_7;
        }
        try {
            javax.net.ssl.SSLContext v0 = javax.net.ssl.SSLContext.getInstance("TLS");
            v0.init(0, com.deniz.dijitaldeniz.helper.HttpsTrustManager.trustManagers, new java.security.SecureRandom());
        } catch (java.security.KeyManagementException v1_1) {
            v1_1.printStackTrace();
        } catch (java.security.KeyManagementException v1_0) {
            v1_0.printStackTrace();
        }
        javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(v0.getSocketFactory());
        return;
    }