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.measurement.internal.zzfy.zzmj() calling method java.util.Random.<init>()


    public final long zzmj()
    {
        if (this.zzauq.get() != 0) {
            try {
                this.zzauq.compareAndSet(-1, 1);
                return this.zzauq.getAndIncrement();
            } catch (Throwable v1_2) {
                throw v1_2;
            }
        } else {
            try {
                Throwable v1_5 = new java.util.Random((System.nanoTime() ^ this.zzbx().currentTimeMillis())).nextLong();
                long v3_1 = (this.zzado + 1);
                this.zzado = v3_1;
                return (v1_5 + ((long) v3_1));
            } catch (Throwable v1_6) {
                throw v1_6;
            }
        }
    }

Method com.google.firebase.database.tubesock.WebSocketWriter.<init>() calling method java.util.Random.<init>()


    WebSocketWriter(com.google.firebase.database.tubesock.WebSocket p4, String p5, int p6)
    {
        this.random = new java.util.Random();
        this.stop = 0;
        this.closeSent = 0;
        this.innerThread = com.google.firebase.database.tubesock.WebSocket.getThreadFactory().newThread(new com.google.firebase.database.tubesock.WebSocketWriter$1(this));
        com.google.firebase.database.tubesock.ThreadInitializer v0_2 = com.google.firebase.database.tubesock.WebSocket.getIntializer();
        Thread v1_1 = this.getInnerThread();
        StringBuilder v2_1 = new StringBuilder();
        v2_1.append(p5);
        v2_1.append("Writer-");
        v2_1.append(p6);
        v0_2.setName(v1_1, v2_1.toString());
        this.websocket = p4;
        this.pendingBuffers = new java.util.concurrent.LinkedBlockingQueue();
        return;
    }

Method com.google.firebase.database.core.utilities.PushIdGenerator.<clinit>() calling method java.util.Random.<init>()


    static PushIdGenerator()
    {
        com.google.firebase.database.core.utilities.PushIdGenerator.randGen = new java.util.Random();
        int[] v0_3 = new int[12];
        com.google.firebase.database.core.utilities.PushIdGenerator.lastRandChars = v0_3;
        return;
    }

Method com.google.firebase.database.connection.util.RetryHelper.<init>() calling method java.util.Random.<init>()


    private RetryHelper(java.util.concurrent.ScheduledExecutorService p2, com.google.firebase.database.logging.LogWrapper p3, long p4, long p6, double p8, double p10)
    {
        this.random = new java.util.Random();
        this.lastWasSuccess = 1;
        this.executorService = p2;
        this.logger = p3;
        this.minRetryDelayAfterFailure = p4;
        this.maxRetryDelay = p6;
        this.retryExponent = p8;
        this.jitterFactor = p10;
        return;
    }

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


    final java.security.SecureRandom zzmk()
    {
        this.zzaf();
        if (this.zzaup == null) {
            this.zzaup = new java.security.SecureRandom();
        }
        return this.zzaup;
    }

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


    protected final void zzgz()
    {
        this.zzaf();
        com.google.android.gms.measurement.internal.zzau v0_5 = new java.security.SecureRandom();
        long v1 = v0_5.nextLong();
        if (v1 == 0) {
            v1 = v0_5.nextLong();
            if (v1 == 0) {
                this.zzgt().zzjj().zzby("Utils falling back to Random for random id");
            }
        }
        this.zzauq.set(v1);
        return;
    }