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 com.google.android.gms.iid.h.a() calling method java.util.Random.<init>()


    private void a(String p5)
    {
        if ("com.google.android.gsf".equals(ark>com.google.android.gms.iid.hark>.a)) {
            this.m = (this.m + 1);
            if (this.m >= 3) {
                if (this.m == 3) {
                    this.n = (new java.util.Random().nextInt(1000) + 1000);
                }
                this.n = (this.n * 2);
                this.o = (android.os.SystemClock.elapsedRealtime() + ((long) this.n));
                android.util.Log.w("InstanceID/Rpc", new StringBuilder().append("Backoff due to ").append(p5).append(" for ").append(this.n).toString());
            }
        }
        return;
    }

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


    aj(com.google.android.gms.measurement.internal.ar p11)
    {
        super(p11);
        super.b = new com.google.android.gms.measurement.internal.am(super, "health_monitor", super.n().H(), 0);
        super.c = new com.google.android.gms.measurement.internal.al(super, "last_upload", 0);
        super.d = new com.google.android.gms.measurement.internal.al(super, "last_upload_attempt", 0);
        super.e = new com.google.android.gms.measurement.internal.al(super, "backoff", 0);
        super.f = new com.google.android.gms.measurement.internal.al(super, "last_delete_stale", 0);
        super.l = new java.security.SecureRandom();
        return;
    }