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.kobjects.crypt.Crypt.generate() calling method java.util.Random.<init>()


    public static final String generate(String p3)
    {
        return org.kobjects.crypt.Crypt.crypt(Integer.toHexString((new java.util.Random().nextInt() & 65535)), p3);
    }

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


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

Method okhttp3.OkHttpClient.newWebSocket() calling method java.util.Random.<init>()


    public okhttp3.WebSocket newWebSocket(okhttp3.Request p7, okhttp3.WebSocketListener p8)
    {
        okhttp3.internal.ws.RealWebSocket v0_1 = new okhttp3.internal.ws.RealWebSocket(p7, p8, new java.util.Random(), ((long) this.pingInterval));
        v0_1.connect(this);
        return v0_1;
    }

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


    zzvz(String p8, String p9, String p10, com.google.android.gms.internal.zzwx p11, com.google.android.gms.internal.zzact p12, java.util.concurrent.ExecutorService p13, java.util.concurrent.ScheduledExecutorService p14, com.google.android.gms.tagmanager.zzba p15)
    {
        this.zzavp = new java.util.Random();
        this.mState = 1;
        this.azf = new java.util.ArrayList();
        this.axj = 0;
        com.google.android.gms.common.internal.zzab.zzy(p8);
        com.google.android.gms.common.internal.zzab.zzy(p11);
        com.google.android.gms.common.internal.zzab.zzy(p12);
        com.google.android.gms.common.internal.zzab.zzy(p13);
        com.google.android.gms.common.internal.zzab.zzy(p14);
        com.google.android.gms.common.internal.zzab.zzy(p15);
        this.auF = p8;
        this.ayX = p10;
        this.ayY = p9;
        this.ayZ = p11;
        this.aza = p12;
        this.azb = p13;
        this.azc = p14;
        this.azd = p15;
        this.azf.add(new com.google.android.gms.internal.zzwe("gtm.load", new android.os.Bundle(), "gtm", new java.util.Date(), 0, this.azd));
        java.util.concurrent.ExecutorService v0_4 = this.auF;
        com.google.android.gms.internal.zzwp.v(new StringBuilder((String.valueOf(v0_4).length() + 35)).append("Container ").append(v0_4).append("is scheduled for loading.").toString());
        this.azb.execute(new com.google.android.gms.internal.zzvz$zzb(this, 0));
        return;
    }

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


    static zzama()
    {
        com.google.android.gms.internal.zzama.bdw = new com.google.android.gms.internal.zzamd();
        com.google.android.gms.internal.zzama.dA = new com.google.android.gms.common.util.zzh();
        com.google.android.gms.internal.zzama.aIR = new java.util.Random();
        return;
    }

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


    private static java.util.Random zzau()
    {
        if (com.google.android.gms.internal.zzam.zzafb == null) {
            if (com.google.android.gms.internal.zzam.zzafb == null) {
                com.google.android.gms.internal.zzam.zzafb = new java.util.Random();
            }
        }
        return com.google.android.gms.internal.zzam.zzafb;
    }

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


    static zzalk()
    {
        int[] v0_5;
        if (com.google.android.gms.internal.zzalk.desiredAssertionStatus()) {
            v0_5 = 0;
        } else {
            v0_5 = 1;
        }
        com.google.android.gms.internal.zzalk.$assertionsDisabled = v0_5;
        com.google.android.gms.internal.zzalk.bac = new java.util.Random();
        com.google.android.gms.internal.zzalk.bad = 0;
        int[] v0_3 = new int[12];
        com.google.android.gms.internal.zzalk.bae = v0_3;
        return;
    }

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


    zzakz(com.google.android.gms.internal.zzakt p5, String p6, int p7)
    {
        this.aSG = new java.util.Random();
        this.aZR = 0;
        this.aZT = 0;
        this.aZx = com.google.android.gms.internal.zzakt.getThreadFactory().newThread(new com.google.android.gms.internal.zzakz$1(this));
        com.google.android.gms.internal.zzakt.zzcvx().zza(this.zzcwe(), new StringBuilder((String.valueOf(p6).length() + 18)).append(p6).append("Writer-").append(p7).toString());
        this.aZO = p5;
        this.aZS = new java.util.concurrent.LinkedBlockingQueue();
        return;
    }

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


    private zzahb(java.util.concurrent.ScheduledExecutorService p2, com.google.android.gms.internal.zzaju p3, long p4, long p6, double p8, double p10)
    {
        this.aSG = new java.util.Random();
        this.aSJ = 1;
        this.aPC = p2;
        this.aPP = p3;
        this.aSC = p4;
        this.aSD = p6;
        this.aSF = p8;
        this.aSE = p10;
        return;
    }

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


    private void zzke(String p5)
    {
        if ("com.google.android.gsf".equals(com.google.android.gms.iid.zzc.aaG)) {
            this.aaP = (this.aaP + 1);
            if (this.aaP >= 3) {
                if (this.aaP == 3) {
                    this.aaQ = (new java.util.Random().nextInt(1000) + 1000);
                }
                this.aaQ = (this.aaQ * 2);
                this.aaR = (android.os.SystemClock.elapsedRealtime() + ((long) this.aaQ));
                android.util.Log.w("InstanceID/Rpc", new StringBuilder((String.valueOf(p5).length() + 31)).append("Backoff due to ").append(p5).append(" for ").append(this.aaQ).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.zzbeg = new java.util.HashMap();
        super.zzctu = new java.util.HashMap();
        if (p6 != null) {
            super.zzbeg.put("&tid", p6);
        }
        super.zzbeg.put("useSecure", "1");
        super.zzbeg.put("&a", Integer.toString((new java.util.Random().nextInt(2147483647) + 1)));
        if (p7 != null) {
            super.zzctv = p7;
        } else {
            super.zzctv = new com.google.android.gms.analytics.internal.zzad("tracking", super.zzyw());
        }
        super.zzctw = 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.zzail = new Object();
        this.zzavp = new java.util.Random();
        this.zziy();
        return;
    }

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


    private java.security.SecureRandom zzbte()
    {
        this.zzwu();
        if (this.akg == null) {
            this.akg = new java.security.SecureRandom();
        }
        return this.akg;
    }

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.aIQ = java.util.concurrent.TimeUnit.MINUTES.toMillis(30);
        com.google.android.gms.wearable.PutDataRequest.aIR = new java.security.SecureRandom();
        return;
    }

Method com.google.android.gms.internal.zzak.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.zzak.zza(p7);
        if (p5.length > v0_3) {
            p5 = com.google.android.gms.internal.zzapv.zzf(com.google.android.gms.internal.zzak.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.zzak.zzg(v0_5)).put(v0_5).array();
        }
        byte[] v1_9 = new byte[256];
        new com.google.android.gms.internal.zzal().zzb(v0_5, v1_9);
        if ((p6 != null) && (p6.length() > 0)) {
            com.google.android.gms.internal.zzak.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.db = p3;
        this.dc = java.util.Collections.unmodifiableList(p4);
        this.dd = java.util.Collections.unmodifiableList(p5);
        this.de = p6;
        this.df = p7;
        this.dg = this.zzaff();
        this.zzavp = new java.security.SecureRandom();
        return;
    }