commit 7ec57142b40943fd2b13d4268c39651ae4951487 Author: Hashik Donthineni HashikDonthineni@gmail.com Date: Mon Jun 22 23:57:47 2020 +0530
Changed random number generation function to Base 64 --- app/src/main/java/org/torproject/snowflake/SIDHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/src/main/java/org/torproject/snowflake/SIDHelper.java b/app/src/main/java/org/torproject/snowflake/SIDHelper.java index b2040d1..1d6cb51 100644 --- a/app/src/main/java/org/torproject/snowflake/SIDHelper.java +++ b/app/src/main/java/org/torproject/snowflake/SIDHelper.java @@ -1,5 +1,7 @@ package org.torproject.snowflake;
+import android.util.Log; + import org.torproject.snowflake.exceptions.EmptySIDException;
import java.util.Random; @@ -28,7 +30,7 @@ public class SIDHelper { * @return generated sid. */ public String generateSid() { - sid = Integer.toString(new Random().nextInt(10000)); + sid = Integer.toString(new Random().nextInt(), 64).substring(2); return sid; }
tor-commits@lists.torproject.org