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


    public final long zzmj()
    {
        if (this.zzavd.get() != 0) {
            try {
                this.zzavd.compareAndSet(-1, 1);
                return this.zzavd.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.zzaed + 1);
                this.zzaed = v3_1;
                return (v1_5 + ((long) v3_1));
            } catch (Throwable v1_7) {
                throw v1_7;
            }
        }
    }

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


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

Method com.google.firebase.storage.internal.ExponentialBackoffSender.<clinit>() calling method java.util.Random.<init>()


    static ExponentialBackoffSender()
    {
        com.google.firebase.storage.internal.ExponentialBackoffSender.sleeper = new com.google.firebase.storage.internal.SleeperImpl();
        com.google.firebase.storage.internal.ExponentialBackoffSender.clock = com.google.android.gms.common.util.DefaultClock.getInstance();
        com.google.firebase.storage.internal.ExponentialBackoffSender.random = new java.util.Random();
        return;
    }

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();
        com.google.firebase.database.core.utilities.PushIdGenerator.lastPushTime = 0;
        int[] v0_4 = new int[12];
        com.google.firebase.database.core.utilities.PushIdGenerator.lastRandChars = v0_4;
        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.dimelo.purpleshop.fragments.NotificationFragment$2.onClick() calling method java.util.Random.<init>()


    public void onClick(android.view.View p5)
    {
        String v5_1 = new java.util.Random();
        String[] v0_1 = new String[5];
        v0_1[0] = "In order to activate your account, please follow these simple steps:\n1. Go to www.mybank.example.com.\n2. Click Personal Account.\n3. Find Activate Your Account button on the left of the screen.\n4. Click it and live happily everafter.";
        v0_1[1] = "We are glad to hear from you. One of the available agents will swiftly contact you to respond to your inquiry. Thank you!";
        v0_1[2] = "Unfortunately, time is over. We cannot support this conversation longer. Please leave this chat and try to solve your problem on your own. Thank you for your understanding.";
        v0_1[3] = "This is a rather long message intended to be truncated when displayed on the lock screen. We hope you understand our intention here.";
        v0_1[4] = "Once upon a time there was a little bear-the-pooh who was searching for a pot of honey everywhere.";
        com.dimelo.purpleshop.fragments.NotificationFragment.access$000(this.this$0, v0_1[v5_1.nextInt((v0_1.length - 1))]);
        return;
    }

Method com.dimelo.purpleshop.fragments.NotificationFragment$1.onClick() calling method java.util.Random.<init>()


    public void onClick(android.view.View p5)
    {
        String v5_1 = new java.util.Random();
        String[] v0_1 = new String[12];
        v0_1[0] = "Hi!";
        v0_1[1] = "Hello";
        v0_1[2] = "What\'s up?";
        v0_1[3] = "Thanks!";
        v0_1[4] = "Kthanxbye";
        v0_1[5] = "Thank you!";
        v0_1[6] = "OMG, REALLY?";
        v0_1[7] = "I don\'t think so.";
        v0_1[8] = "Maybe tomorrow.";
        v0_1[9] = "How about next Tuesday?";
        v0_1[10] = "This weekend is fine by me.";
        v0_1[11] = "Slightly longer message to be displayed as a non-truncated one.";
        com.dimelo.purpleshop.fragments.NotificationFragment.access$000(this.this$0, v0_1[v5_1.nextInt((v0_1.length - 1))]);
        return;
    }

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


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

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


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