Really, clear the confirmation password

pull/41/head
Alexander Bakker 7 years ago
parent 9286196811
commit fb24867569

@ -22,6 +22,7 @@ import java.lang.reflect.UndeclaredThrowableException;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import me.impy.aegis.crypto.CryptoUtils;
import me.impy.aegis.crypto.KeyStoreHandle;
import me.impy.aegis.crypto.slots.Slot;
import me.impy.aegis.finger.FingerprintUiHelper;
@ -58,7 +59,7 @@ public class CustomAuthenticatedSlide extends Fragment implements FingerprintUiH
}
public char[] getPassword() {
AuthHelper.getPassword(_textPasswordConfirm, true);
AuthHelper.clearPassword(_textPasswordConfirm);
return AuthHelper.getPassword(_textPassword, true);
}

@ -14,11 +14,15 @@ public class AuthHelper {
public static char[] getPassword(EditText text, boolean clear) {
char[] password = getEditTextChars(text);
if (clear) {
text.getText().clear();
clearPassword(text);
}
return password;
}
public static void clearPassword(EditText text) {
text.getText().clear();
}
public static char[] getEditTextChars(EditText text) {
Editable editable = text.getText();
char[] chars = new char[editable.length()];

Loading…
Cancel
Save