Use 0-9 for generated admin pin (derp)

This commit is contained in:
Vincent Breitmoser
2018-05-23 16:24:05 +02:00
parent d00e27ad2e
commit 98dc854d03

View File

@@ -131,14 +131,14 @@ public class CreateSecurityTokenPinFragment extends Fragment {
SecureRandom secureRandom = new SecureRandom(); SecureRandom secureRandom = new SecureRandom();
// min = 8, we choose 8 // min = 8, we choose 8
String adminPin = "" + secureRandom.nextInt(9) String adminPin = "" + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9) + secureRandom.nextInt(10)
+ secureRandom.nextInt(9); + secureRandom.nextInt(10);
return new Passphrase(adminPin); return new Passphrase(adminPin);
} }