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


    static zzepc()
    {
        com.google.android.gms.internal.zzepc.zznrh = new java.util.Random();
        com.google.android.gms.internal.zzepc.zznri = 0;
        int[] v0_4 = new int[12];
        com.google.android.gms.internal.zzepc.zznrj = v0_4;
        return;
    }

Method com.google.android.gms.wearable.PutDataRequest.<clinit>() calling method java.security.SecureRandom.<init>()


    static PutDataRequest()
    {
        com.google.android.gms.wearable.PutDataRequest.CREATOR = new com.google.android.gms.wearable.zzh();
        com.google.android.gms.wearable.PutDataRequest.zzlqx = java.util.concurrent.TimeUnit.MINUTES.toMillis(30);
        com.google.android.gms.wearable.PutDataRequest.zzlqy = new java.security.SecureRandom();
        return;
    }

Method org.apache.http.impl.auth.DigestSchemeHC4.createCnonce() calling method java.security.SecureRandom.<init>()


    public static String createCnonce()
    {
        byte[] v1_1 = new byte[8];
        new java.security.SecureRandom().nextBytes(v1_1);
        return org.apache.http.impl.auth.DigestSchemeHC4.encode(v1_1);
    }

Method cz.msebera.android.httpclient.impl.auth.DigestScheme.createCnonce() calling method java.security.SecureRandom.<init>()


    public static String createCnonce()
    {
        byte[] v1_1 = new byte[8];
        new java.security.SecureRandom().nextBytes(v1_1);
        return cz.msebera.android.httpclient.impl.auth.DigestScheme.encode(v1_1);
    }

Method com.google.android.gms.internal.zzfbc.<clinit>() calling method java.util.Random.<init>()


    static zzfbc()
    {
        com.google.android.gms.internal.zzfbc.zzoxp = new com.google.android.gms.internal.zzfbf();
        com.google.android.gms.internal.zzfbc.zzemg = com.google.android.gms.common.util.zzi.zzanq();
        com.google.android.gms.internal.zzfbc.zzlqy = new java.util.Random();
        return;
    }

Method com.google.android.gms.tagmanager.zzai.<init>() calling method java.util.Random.<init>()


    public zzai(android.content.Context p2, String p3)
    {
        this(p2, p3, new java.util.Random());
        return;
    }

Method cz.msebera.android.httpclient.entity.mime.MultipartEntityBuilder.generateBoundary() calling method java.util.Random.<init>()


    private String generateBoundary()
    {
        String v0_1 = new StringBuilder();
        java.util.Random v1_1 = new java.util.Random();
        int v2_2 = (v1_1.nextInt(11) + 30);
        int v3 = 0;
        while (v3 < v2_2) {
            v0_1.append(cz.msebera.android.httpclient.entity.mime.MultipartEntityBuilder.MULTIPART_CHARS[v1_1.nextInt(cz.msebera.android.httpclient.entity.mime.MultipartEntityBuilder.MULTIPART_CHARS.length)]);
            v3++;
        }
        return v0_1.toString();
    }

Method com.loopj.android.http.SimpleMultipartEntity.<init>() calling method java.util.Random.<init>()


    public SimpleMultipartEntity(com.loopj.android.http.ResponseHandlerInterface p6)
    {
        this.fileParts = new java.util.ArrayList();
        this.out = new java.io.ByteArrayOutputStream();
        byte[] v0_14 = new StringBuilder();
        String v1_0 = new java.util.Random();
        int v2 = 0;
        while (v2 < 30) {
            v0_14.append(com.loopj.android.http.SimpleMultipartEntity.MULTIPART_CHARS[v1_0.nextInt(com.loopj.android.http.SimpleMultipartEntity.MULTIPART_CHARS.length)]);
            v2++;
        }
        this.boundary = v0_14.toString();
        byte[] v0_3 = new StringBuilder();
        v0_3.append("--");
        v0_3.append(this.boundary);
        v0_3.append("\r\n");
        this.boundaryLine = v0_3.toString().getBytes();
        byte[] v0_8 = new StringBuilder();
        v0_8.append("--");
        v0_8.append(this.boundary);
        v0_8.append("--");
        v0_8.append("\r\n");
        this.boundaryEnd = v0_8.toString().getBytes();
        this.progressHandler = p6;
        return;
    }

Method com.telemed.ae.ui.common.DashBoardSecond.randomBox() calling method java.util.Random.<init>()


    public int randomBox()
    {
        return new java.util.Random().nextInt(100);
    }

Method oauth.signpost.AbstractOAuthConsumer.<init>() calling method java.util.Random.<init>()


    public AbstractOAuthConsumer(String p4, String p5)
    {
        this.random = new java.util.Random(System.nanoTime());
        this.consumerKey = p4;
        this.consumerSecret = p5;
        this.setMessageSigner(new oauth.signpost.signature.HmacSha1MessageSigner());
        this.setSigningStrategy(new oauth.signpost.signature.AuthorizationHeaderSigningStrategy());
        return;
    }

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


    static zzdyl()
    {
        com.google.android.gms.internal.zzdyl.zzjsn = new java.security.SecureRandom();
        return;
    }

Method cz.msebera.android.httpclient.extras.PRNGFixes.installLinuxPRNGSecureRandom() calling method java.security.SecureRandom.<init>()


    private static void installLinuxPRNGSecureRandom()
    {
        if (android.os.Build$VERSION.SDK_INT <= 18) {
            String v0_14 = java.security.Security.getProviders("SecureRandom.SHA1PRNG");
            if ((v0_14 == null) || ((v0_14.length < 1) || (!cz.msebera.android.httpclient.extras.PRNGFixes$LinuxPRNGSecureRandomProvider.equals(v0_14[0].getClass())))) {
                java.security.Security.insertProviderAt(new cz.msebera.android.httpclient.extras.PRNGFixes$LinuxPRNGSecureRandomProvider(), 1);
            }
            String v0_7 = new java.security.SecureRandom();
            if (!cz.msebera.android.httpclient.extras.PRNGFixes$LinuxPRNGSecureRandomProvider.equals(v0_7.getProvider().getClass())) {
                StringBuilder v2_4 = new StringBuilder();
                v2_4.append("new SecureRandom() backed by wrong Provider: ");
                v2_4.append(v0_7.getProvider().getClass());
                throw new SecurityException(v2_4.toString());
            } else {
                try {
                    String v0_13 = java.security.SecureRandom.getInstance("SHA1PRNG");
                } catch (String v0_15) {
                    throw new SecurityException("SHA1PRNG not available", v0_15);
                }
                if (!cz.msebera.android.httpclient.extras.PRNGFixes$LinuxPRNGSecureRandomProvider.equals(v0_13.getProvider().getClass())) {
                    StringBuilder v2_9 = new StringBuilder();
                    v2_9.append("SecureRandom.getInstance(\"SHA1PRNG\") backed by wrong Provider: ");
                    v2_9.append(v0_13.getProvider().getClass());
                    throw new SecurityException(v2_9.toString());
                } else {
                    return;
                }
            }
        } else {
            return;
        }
    }

Method com.google.android.gms.internal.zzcp.zzac() calling method java.util.Random.<init>()


    private static java.util.Random zzac()
    {
        if (com.google.android.gms.internal.zzcp.zzagu == null) {
            try {
                if (com.google.android.gms.internal.zzcp.zzagu == null) {
                    com.google.android.gms.internal.zzcp.zzagu = new java.util.Random();
                }
            } catch (java.util.Random v1_3) {
                throw v1_3;
            }
        }
        return com.google.android.gms.internal.zzcp.zzagu;
    }

Method com.google.android.gms.internal.zzczp.<init>() calling method java.util.Random.<init>()


    public zzczp(android.content.Context p2, String p3)
    {
        this(p2, p3, new java.util.Random());
        return;
    }

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


    protected final void zzbap()
    {
        this.zzwj();
        com.google.android.gms.internal.zzcjl v0_5 = new java.security.SecureRandom();
        long v1 = v0_5.nextLong();
        if (v1 == 0) {
            v1 = v0_5.nextLong();
            if (v1 == 0) {
                this.zzayp().zzbaw().log("Utils falling back to Random for random id");
            }
        }
        this.zzjso.set(v1);
        return;
    }

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


    final java.security.SecureRandom zzbcr()
    {
        this.zzwj();
        if (this.zzjsn == null) {
            this.zzjsn = new java.security.SecureRandom();
        }
        return this.zzjsn;
    }

Method com.google.android.gms.internal.zzefz.<init>() calling method java.util.Random.<init>()


    private zzefz(java.util.concurrent.ScheduledExecutorService p2, com.google.android.gms.internal.zzemm p3, long p4, long p6, double p8, double p10)
    {
        this.random = new java.util.Random();
        this.zzndm = 1;
        this.zzmxn = p2;
        this.zzmxz = p3;
        this.zzndg = p4;
        this.zzndh = p6;
        this.zzndj = p8;
        this.zzndi = p10;
        return;
    }

Method com.google.android.gms.auth.api.credentials.PasswordSpecification.<init>() calling method java.security.SecureRandom.<init>()


    PasswordSpecification(String p4, java.util.List p5, java.util.List p6, int p7, int p8)
    {
        this.zzelk = p4;
        this.zzell = java.util.Collections.unmodifiableList(p5);
        this.zzelm = java.util.Collections.unmodifiableList(p6);
        this.zzeln = p7;
        this.zzelo = p8;
        java.security.SecureRandom v4_2 = new int[95];
        java.util.Arrays.fill(v4_2, -1);
        java.util.Iterator v5_3 = this.zzell.iterator();
        int v7_1 = 0;
        while (v5_3.hasNext()) {
            char[] v8_4 = ((String) v5_3.next()).toCharArray();
            int v0 = v8_4.length;
            int v1 = 0;
            while (v1 < v0) {
                v4_2[(v8_4[v1] - 32)] = v7_1;
                v1++;
            }
            v7_1++;
        }
        this.zzelp = v4_2;
        this.zzbje = new java.security.SecureRandom();
        return;
    }

Method com.google.android.gms.internal.zzeoo.<init>() calling method java.util.Random.<init>()


    zzeoo(com.google.android.gms.internal.zzeoe p5, String p6, int p7)
    {
        this.random = new java.util.Random();
        this.zznqw = 0;
        this.zznqy = 0;
        this.zznqc = com.google.android.gms.internal.zzeoe.getThreadFactory().newThread(new com.google.android.gms.internal.zzeop(this));
        com.google.android.gms.internal.zzeod v0_2 = com.google.android.gms.internal.zzeoe.zzcdb();
        Thread v1_1 = this.zznqc;
        StringBuilder v3_1 = new StringBuilder((String.valueOf(p6).length() + 18));
        v3_1.append(p6);
        v3_1.append("Writer-");
        v3_1.append(p7);
        v0_2.zza(v1_1, v3_1.toString());
        this.zznqt = p5;
        this.zznqx = new java.util.concurrent.LinkedBlockingQueue();
        return;
    }

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


    private static byte[] zza(byte[] p3, String p4, boolean p5)
    {
        int v0_0;
        if (p5 == null) {
            v0_0 = 255;
        } else {
            v0_0 = 239;
        }
        if (p3.length > v0_0) {
            p3 = com.google.android.gms.internal.zzfls.zzc(com.google.android.gms.internal.zzbx.zzc(4096));
        }
        byte[] v3_1;
        if (p3.length >= v0_0) {
            v3_1 = java.nio.ByteBuffer.allocate((v0_0 + 1)).put(((byte) p3.length)).put(p3);
        } else {
            java.nio.ByteBuffer v1_5 = new byte[(v0_0 - p3.length)];
            new java.security.SecureRandom().nextBytes(v1_5);
            v3_1 = java.nio.ByteBuffer.allocate((v0_0 + 1)).put(((byte) p3.length)).put(p3).put(v1_5);
        }
        byte[] v3_3 = v3_1.array();
        if (p5 != null) {
            v3_3 = java.nio.ByteBuffer.allocate(256).put(com.google.android.gms.internal.zzbx.zzb(v3_3)).put(v3_3).array();
        }
        byte[] v5_3 = new byte[256];
        new com.google.android.gms.internal.zzca().zza(v3_3, v5_3);
        if ((p4 != null) && (p4.length() > 0)) {
            if (p4.length() > 32) {
                p4 = p4.substring(0, 32);
            }
            new com.google.android.gms.internal.zzffa(p4.getBytes("UTF-8")).zzay(v5_3);
        }
        return v5_3;
    }

Method twitter4j.auth.OAuthAuthorization.<clinit>() calling method java.util.Random.<init>()


    static OAuthAuthorization()
    {
        twitter4j.auth.OAuthAuthorization.OAUTH_SIGNATURE_METHOD = new twitter4j.HttpParameter("oauth_signature_method", "HMAC-SHA1");
        twitter4j.auth.OAuthAuthorization.logger = twitter4j.Logger.getLogger(twitter4j.auth.OAuthAuthorization);
        twitter4j.auth.OAuthAuthorization.RAND = new java.util.Random();
        return;
    }

Method com.google.android.gms.analytics.Tracker.<init>() calling method java.util.Random.<init>()


    Tracker(com.google.android.gms.internal.zzark p3, String p4, com.google.android.gms.internal.zzatb p5)
    {
        super(p3);
        super.zzbwu = new java.util.HashMap();
        super.zzdvw = new java.util.HashMap();
        if (p4 != null) {
            super.zzbwu.put("&tid", p4);
        }
        super.zzbwu.put("useSecure", "1");
        super.zzbwu.put("&a", Integer.toString((new java.util.Random().nextInt(2147483647) + 1)));
        super.zzdvx = new com.google.android.gms.internal.zzatb("tracking", super.zzxx());
        super.zzdvy = new com.google.android.gms.analytics.Tracker$zza(super, p3);
        return;
    }

Method com.google.android.gms.internal.zzcno.zzbcq() calling method java.util.Random.<init>()


    public final long zzbcq()
    {
        if (this.zzjso.get() != 0) {
            try {
                this.zzjso.compareAndSet(-1, 1);
                return this.zzjso.getAndIncrement();
            } catch (Throwable v1_2) {
                throw v1_2;
            }
        } else {
            try {
                Throwable v1_5 = new java.util.Random((System.nanoTime() ^ this.zzxx().currentTimeMillis())).nextLong();
                long v3_1 = (this.zzjsp + 1);
                this.zzjsp = v3_1;
                return (v1_5 + ((long) v3_1));
            } catch (Throwable v1_7) {
                throw v1_7;
            }
        }
    }

Method com.google.android.gms.internal.zzld.<init>() calling method java.util.Random.<init>()


    public zzld()
    {
        this.mLock = new Object();
        this.zzbje = new java.util.Random();
        this.zzip();
        return;
    }

Method com.google.android.gms.internal.zzum.onAdClosed() calling method java.util.Random.<init>()


    public final void onAdClosed()
    {
        if (com.google.android.gms.internal.zzuv.zzlx()) {
            long v0_1 = ((Integer) com.google.android.gms.internal.zzlc.zzio().zzd(com.google.android.gms.internal.zzoi.zzbpz)).intValue();
            int v1_3 = ((Integer) com.google.android.gms.internal.zzlc.zzio().zzd(com.google.android.gms.internal.zzoi.zzbqa)).intValue();
            if ((v0_1 > 0) && (v1_3 >= 0)) {
                com.google.android.gms.internal.zzaij.zzdfn.postDelayed(com.google.android.gms.internal.zzun.zzcdy, ((long) (v0_1 + new java.util.Random().nextInt((v1_3 + 1)))));
            } else {
                com.google.android.gms.ads.internal.zzbt.zzey().zzlg();
            }
        }
        this.zzcdx.onAdClosed();
        return;
    }