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


    public final long zzln()
    {
        try {
            Throwable v0_2;
            if (this.zzasz.get() != 0) {
                try {
                    this.zzasz.compareAndSet(-1, 1);
                    v0_2 = this.zzasz.getAndIncrement();
                } catch (Throwable v0_3) {
                    throw v0_3;
                }
            } else {
                Throwable v0_7 = new java.util.Random((System.nanoTime() ^ this.zzbt().currentTimeMillis())).nextLong();
                int v3_1 = (this.zzadj + 1);
                this.zzadj = v3_1;
                v0_2 = (v0_7 + ((long) v3_1));
            }
        } catch (Throwable v0_8) {
            throw v0_8;
        }
        return v0_2;
    }

Method org.apache.cordova.firebase.FirebasePluginMessagingService.onMessageReceived() calling method java.util.Random.<init>()


    public void onMessageReceived(com.google.firebase.messaging.RemoteMessage p10)
    {
        String v2_0;
        String v3_1;
        String v1_1;
        if (p10.getNotification() == null) {
            v2_0 = ((String) p10.getData().get("title"));
            v3_1 = ((String) p10.getData().get("text"));
            v1_1 = ((String) p10.getData().get("id"));
        } else {
            v2_0 = p10.getNotification().getTitle();
            v3_1 = p10.getNotification().getBody();
            v1_1 = p10.getMessageId();
        }
        if (android.text.TextUtils.isEmpty(v1_1)) {
            v1_1 = Integer.toString((new java.util.Random().nextInt(50) + 1));
        }
        android.util.Log.d("FirebasePlugin", new StringBuilder().append("From: ").append(p10.getFrom()).toString());
        android.util.Log.d("FirebasePlugin", new StringBuilder().append("Notification Message id: ").append(v1_1).toString());
        android.util.Log.d("FirebasePlugin", new StringBuilder().append("Notification Message Title: ").append(v2_0).toString());
        android.util.Log.d("FirebasePlugin", new StringBuilder().append("Notification Message Body/Text: ").append(v3_1).toString());
        if ((!android.text.TextUtils.isEmpty(v3_1)) || ((!android.text.TextUtils.isEmpty(v2_0)) || (!p10.getData().isEmpty()))) {
            if (((!org.apache.cordova.firebase.FirebasePlugin.inBackground()) && (org.apache.cordova.firebase.FirebasePlugin.hasNotificationsCallback())) || ((android.text.TextUtils.isEmpty(v3_1)) && (android.text.TextUtils.isEmpty(v2_0)))) {
                int v5 = 0;
            } else {
                v5 = 1;
            }
            this.sendNotification(v1_1, v2_0, v3_1, p10.getData(), v5);
        }
        return;
    }

Method cordova.plugins.Diagnostic.generateRandom() calling method java.util.Random.<init>()


    private String generateRandom()
    {
        return Integer.toString((new java.util.Random().nextInt(1000000) + 1));
    }

Method com.plugin.datepicker.DatePickerPlugin$1.run() calling method java.util.Random.<init>()


    public void run()
    {
        com.plugin.datepicker.DatePickerPlugin$TimeSetListener v0_1 = new com.plugin.datepicker.DatePickerPlugin$TimeSetListener(this.this$0, this.val$datePickerPlugin, this.val$callbackContext, this.val$calendarDate, 0);
        com.plugin.datepicker.DatePickerPlugin$1$1 v1_1 = new com.plugin.datepicker.DatePickerPlugin$1$1(this, this.val$currentCtx, this.val$theme, v0_1, com.plugin.datepicker.DatePickerPlugin$JsonDate.access$200(this.val$jsonDate), com.plugin.datepicker.DatePickerPlugin$JsonDate.access$300(this.val$jsonDate), com.plugin.datepicker.DatePickerPlugin$JsonDate.access$400(this.val$jsonDate));
        if (android.os.Build$VERSION.SDK_INT >= 11) {
            v1_1.setCancelable(1);
            v1_1.setCanceledOnTouchOutside(0);
            if (!com.plugin.datepicker.DatePickerPlugin$JsonDate.access$800(this.val$jsonDate).isEmpty()) {
                v1_1.setTitle(com.plugin.datepicker.DatePickerPlugin$JsonDate.access$800(this.val$jsonDate));
            }
            if (!com.plugin.datepicker.DatePickerPlugin$JsonDate.access$900(this.val$jsonDate).isEmpty()) {
                v1_1.setButton(-3, com.plugin.datepicker.DatePickerPlugin$JsonDate.access$900(this.val$jsonDate), new com.plugin.datepicker.DatePickerPlugin$1$2(this, v0_1));
            }
            String v9;
            if (!com.plugin.datepicker.DatePickerPlugin$JsonDate.access$1000(this.val$jsonDate).isEmpty()) {
                v9 = com.plugin.datepicker.DatePickerPlugin$JsonDate.access$1000(this.val$jsonDate);
            } else {
                v9 = this.val$currentCtx.getString(17039360);
            }
            String v10;
            v1_1.setButton(-2, v9, new com.plugin.datepicker.DatePickerPlugin$1$3(this));
            if (!com.plugin.datepicker.DatePickerPlugin$JsonDate.access$1200(this.val$jsonDate).isEmpty()) {
                v10 = com.plugin.datepicker.DatePickerPlugin$JsonDate.access$1200(this.val$jsonDate);
            } else {
                v10 = this.val$currentCtx.getString(17039370);
            }
            v1_1.setButton(-1, v10, v1_1);
        }
        v1_1.show();
        v1_1.updateTime(new java.util.Random().nextInt(23), new java.util.Random().nextInt(59));
        v1_1.updateTime(com.plugin.datepicker.DatePickerPlugin$JsonDate.access$200(this.val$jsonDate), com.plugin.datepicker.DatePickerPlugin$JsonDate.access$300(this.val$jsonDate));
        return;
    }

Method com.facebook.internal.Utility.generateRandomString() calling method java.util.Random.<init>()


    public static String generateRandomString(int p3)
    {
        return new java.math.BigInteger((p3 * 5), new java.util.Random()).toString(32);
    }

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


    final java.security.SecureRandom zzlo()
    {
        this.zzab();
        if (this.zzasy == null) {
            this.zzasy = new java.security.SecureRandom();
        }
        return this.zzasy;
    }

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


    protected final void zzgo()
    {
        this.zzab();
        com.google.android.gms.internal.measurement.zzfk v2_5 = new java.security.SecureRandom();
        long v0 = v2_5.nextLong();
        if (v0 == 0) {
            v0 = v2_5.nextLong();
            if (v0 == 0) {
                this.zzgi().zziy().log("Utils falling back to Random for random id");
            }
        }
        this.zzasz.set(v0);
        return;
    }

Method org.apache.cordova.CordovaBridge.generateBridgeSecret() calling method java.security.SecureRandom.<init>()


    int generateBridgeSecret()
    {
        this.expectedBridgeSecret = new java.security.SecureRandom().nextInt(2147483647);
        return this.expectedBridgeSecret;
    }