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.crashlytics.android.answers.RandomBackoff.<init>() calling method java.util.Random.<init>()


    public RandomBackoff(io.fabric.sdk.android.services.concurrency.internal.Backoff p3, double p4)
    {
        this(p3, p4, new java.util.Random());
        return;
    }

Method com.facebook.internal.am.a() calling method java.util.Random.<init>()


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

Method com.nostra13.socialsharing.twitter.extpack.oauth.signpost.a.g() calling method java.util.Random.<init>()


    protected String g()
    {
        return Long.toString(new java.util.Random().nextLong());
    }

Method com.nostra13.socialsharing.twitter.extpack.winterwell.jtwitter.a.r() calling method java.util.Random.<init>()


    private void r()
    {
        try {
            this.b();
            return;
        } catch (int v0_5) {
            throw v0_5;
        } catch (int v0_3) {
            System.out.println(v0_3);
            int v0_0 = (new java.util.Random().nextInt(40) + 20);
            int v1_0 = 0;
        }
    }

Method com.vnpay.vntalk.e.a.b() calling method java.security.SecureRandom.<init>()


    public byte[] b()
    {
        byte[] v0_1 = new byte[16];
        new java.security.SecureRandom().nextBytes(v0_1);
        return v0_1;
    }

Method com.vnpay.ncb.utilities.e.a() calling method java.security.SecureRandom.<init>()


    public static okhttp3.OkHttpClient a()
    {
        try {
            Exception v0_3 = new okhttp3.OkHttpClient$Builder().retryOnConnectionFailure(1).cache(new okhttp3.Cache(new java.io.File(com.vnpay.ncb.BaseActivity$13$j$n.jiyyjg("\u2e68")), 2097152)).build();
            javax.net.ssl.SSLSocketFactory v2_3 = javax.net.ssl.SSLContext.getInstance(com.vnpay.ncb.BaseActivity$13$j$n.jiyyjg("\u2e13\uab72\ue5c6"));
            RuntimeException v1_1 = new javax.net.ssl.TrustManager[1];
            v1_1[0] = new ark>com.vnpay.ncb.utilities.eark>$1();
            v2_3.init(0, v1_1, new java.security.SecureRandom());
            return v0_3.newBuilder().sslSocketFactory(v2_3.getSocketFactory(), ((javax.net.ssl.X509TrustManager) v1_1[0])).build();
        } catch (Exception v0_8) {
            throw new RuntimeException(v0_8);
        }
    }

Method com.vnpay.notification.a.a() calling method java.security.SecureRandom.<init>()


    public static byte[] a()
    {
        byte[] v0_1 = new byte[16];
        new java.security.SecureRandom().nextBytes(v0_1);
        return v0_1;
    }

Method com.vnpay.ticketlib.Utils.cryptoflight.AESService.generateIV() calling method java.security.SecureRandom.<init>()


    public static byte[] generateIV()
    {
        byte[] v0_1 = new byte[16];
        new java.security.SecureRandom().nextBytes(v0_1);
        return v0_1;
    }

Method com.vnpay.vexemphim.c.a.a() calling method java.security.SecureRandom.<init>()


    public static byte[] a()
    {
        byte[] v0_1 = new byte[16];
        new java.security.SecureRandom().nextBytes(v0_1);
        return v0_1;
    }

Method com.vn.a.d.a() calling method java.util.Random.<init>()


    public android.graphics.Bitmap a(android.graphics.Bitmap p12)
    {
        int v8 = p12.getWidth();
        int v9 = p12.getHeight();
        int[] v10 = new int[(v8 * v9)];
        p12.getPixels(v10, 0, v8, 0, 0, v8, v9);
        android.graphics.Bitmap v12_2 = new java.util.Random();
        int v1_1 = 0;
        while (v1_1 < v9) {
            int v2_1 = 0;
            while (v2_1 < v8) {
                int v3_3 = ((v1_1 * v8) + v2_1);
                int v4_2 = android.graphics.Color.red(v10[v3_3]);
                int v5_2 = android.graphics.Color.green(v10[v3_3]);
                int v6_3 = android.graphics.Color.blue(v10[v3_3]);
                int v7_3 = v12_2.nextInt(255);
                if ((v4_2 < v7_3) && ((v5_2 < v7_3) && (v6_3 < v7_3))) {
                    v10[v3_3] = android.graphics.Color.rgb(0, 0, 0);
                }
                v2_1++;
            }
            v1_1++;
        }
        android.graphics.Bitmap v12_4 = android.graphics.Bitmap.createBitmap(v8, v9, android.graphics.Bitmap$Config.ARGB_8888);
        v12_4.setPixels(v10, 0, v8, 0, 0, v8, v9);
        return v12_4;
    }

Method com.vn.a.d.d() calling method java.util.Random.<init>()


    public android.graphics.Bitmap d(android.graphics.Bitmap p12)
    {
        int v8 = p12.getWidth();
        int v9 = p12.getHeight();
        int[] v10 = new int[(v8 * v9)];
        p12.getPixels(v10, 0, v8, 0, 0, v8, v9);
        android.graphics.Bitmap v0_1 = new java.util.Random();
        int v2_0 = 0;
        while (v2_0 < v9) {
            int v3_2 = 0;
            while (v3_2 < v8) {
                int v4_2 = ((v2_0 * v8) + v3_2);
                v10[v4_2] = (android.graphics.Color.rgb(v0_1.nextInt(255), v0_1.nextInt(255), v0_1.nextInt(255)) | v10[v4_2]);
                v3_2++;
            }
            v2_0++;
        }
        android.graphics.Bitmap v12_2 = android.graphics.Bitmap.createBitmap(v8, v9, p12.getConfig());
        v12_2.setPixels(v10, 0, v8, 0, 0, v8, v9);
        return v12_2;
    }

Method com.vn.a.d.k() calling method java.util.Random.<init>()


    public android.graphics.Bitmap k(android.graphics.Bitmap p13)
    {
        int v8 = p13.getWidth();
        int v9 = p13.getHeight();
        int[] v10 = new int[(v8 * v9)];
        p13.getPixels(v10, 0, v8, 0, 0, v8, v9);
        android.graphics.Bitmap v13_2 = new java.util.Random();
        int v1_1 = 0;
        while (v1_1 < v9) {
            int v2_1 = 0;
            while (v2_1 < v8) {
                int v3_3 = ((v1_1 * v8) + v2_1);
                int v4_2 = android.graphics.Color.red(v10[v3_3]);
                int v5_2 = android.graphics.Color.green(v10[v3_3]);
                int v6_3 = android.graphics.Color.blue(v10[v3_3]);
                int v11 = v13_2.nextInt(255);
                if ((v4_2 > v11) && ((v5_2 > v11) && (v6_3 > v11))) {
                    v10[v3_3] = android.graphics.Color.rgb(255, 255, 255);
                }
                v2_1++;
            }
            v1_1++;
        }
        android.graphics.Bitmap v13_4 = android.graphics.Bitmap.createBitmap(v8, v9, android.graphics.Bitmap$Config.RGB_565);
        v13_4.setPixels(v10, 0, v8, 0, 0, v8, v9);
        return v13_4;
    }

Method com.vnpay.ncb.activity.DetailFeatureNewActivity.h() calling method java.util.Random.<init>()


    public void h()
    {
        this.e();
        this.b.b(2131690285);
        this.b.e(-1);
        this.e = ((android.webkit.WebView) this.findViewById(2131298150));
        this.c = this.findViewById(2131298123);
        this.e.getSettings().setJavaScriptEnabled(1);
        new java.util.Random().nextInt(99);
        this.f = com.vnpay.ncb.utilities.CommonBank.loginEntity.urlBankCard;
        if (this.f.contains(com.vnpay.ncb.BaseActivity$13$j$n.jiyyjg("\ueeee\uf829\uc90d\u3ab8"))) {
            android.webkit.WebSettings v0_13 = new StringBuilder();
            v0_13.append(com.vnpay.ncb.BaseActivity$13$j$n.jiyyjg("\ueea8\uf82d\uc91d\u3aae\u67da\u38b7\udea7\u2c27\u4aac\u4c05\u3b6d\u3026\u357b\u7c46\u6b60\u99b4\u8512\uc409\uaf13\ue498\uecc1\u70a6\u38a3\uc057\u4a22\u270b\u03ec\u84c7\u24bf\ue961\u3ebc\uedc3\udecb\uc1e2\uf8c0\u2482\ua9e2\ub6d9\uc3fc\u24d5\u68e9\ufa42\u2b29\ucd05\u83a3\u9fd0\u4f71\u941c"));
            v0_13.append(this.f);
            this.f = v0_13.toString();
        }
        this.e.setWebViewClient(new com.vnpay.ncb.activity.DetailFeatureNewActivity$a(this));
        this.e.loadUrl(this.f);
        this.e.getSettings().setLayoutAlgorithm(android.webkit.WebSettings$LayoutAlgorithm.SINGLE_COLUMN);
        this.e.setScrollBarStyle(33554432);
        this.e.setInitialScale(1);
        this.e.getSettings().setDefaultZoom(android.webkit.WebSettings$ZoomDensity.FAR);
        this.e.getSettings().setLoadWithOverviewMode(1);
        this.e.getSettings().setUseWideViewPort(1);
        this.e.getSettings().setSupportZoom(1);
        this.e.getSettings().setBuiltInZoomControls(1);
        this.e.getSettings().setAllowFileAccess(0);
        return;
    }

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.vnpay.vntalk.util.m.b() calling method java.util.Random.<init>()


    public static int b(int p1)
    {
        return ((new java.util.Random().nextInt() >> 1) % p1);
    }