From 98dc854d0390fb338eeab4ee8de1d7aa71170441 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 23 May 2018 16:24:05 +0200 Subject: [PATCH] Use 0-9 for generated admin pin (derp) --- .../ui/CreateSecurityTokenPinFragment.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateSecurityTokenPinFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateSecurityTokenPinFragment.java index 289600f43..883ad4dfa 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateSecurityTokenPinFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateSecurityTokenPinFragment.java @@ -131,14 +131,14 @@ public class CreateSecurityTokenPinFragment extends Fragment { SecureRandom secureRandom = new SecureRandom(); // min = 8, we choose 8 - String adminPin = "" + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9) - + secureRandom.nextInt(9); + String adminPin = "" + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10) + + secureRandom.nextInt(10); return new Passphrase(adminPin); }