set security token admin pin to 12345678 in debug builds

This commit is contained in:
Vincent Breitmoser
2017-09-28 16:58:42 +02:00
parent 75263f8d37
commit 3d473e05ad

View File

@@ -29,6 +29,7 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.securitytoken.SecurityTokenHelper;
import org.sufficientlysecure.keychain.ui.CreateKeyActivity.FragAction;
@@ -125,6 +126,10 @@ public class CreateSecurityTokenPinFragment extends Fragment {
new AsyncTask<Void, Void, Passphrase>() {
@Override
protected Passphrase doInBackground(Void... unused) {
if (Constants.DEBUG) {
return new Passphrase("12345678");
}
SecureRandom secureRandom = new SecureRandom();
// min = 8, we choose 8
String adminPin = "" + secureRandom.nextInt(9)