mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
Really, clear the confirmation password
This commit is contained in:
parent
9286196811
commit
fb24867569
2 changed files with 7 additions and 2 deletions
|
@ -22,6 +22,7 @@ import java.lang.reflect.UndeclaredThrowableException;
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
|
|
||||||
|
import me.impy.aegis.crypto.CryptoUtils;
|
||||||
import me.impy.aegis.crypto.KeyStoreHandle;
|
import me.impy.aegis.crypto.KeyStoreHandle;
|
||||||
import me.impy.aegis.crypto.slots.Slot;
|
import me.impy.aegis.crypto.slots.Slot;
|
||||||
import me.impy.aegis.finger.FingerprintUiHelper;
|
import me.impy.aegis.finger.FingerprintUiHelper;
|
||||||
|
@ -58,7 +59,7 @@ public class CustomAuthenticatedSlide extends Fragment implements FingerprintUiH
|
||||||
}
|
}
|
||||||
|
|
||||||
public char[] getPassword() {
|
public char[] getPassword() {
|
||||||
AuthHelper.getPassword(_textPasswordConfirm, true);
|
AuthHelper.clearPassword(_textPasswordConfirm);
|
||||||
return AuthHelper.getPassword(_textPassword, true);
|
return AuthHelper.getPassword(_textPassword, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,15 @@ public class AuthHelper {
|
||||||
public static char[] getPassword(EditText text, boolean clear) {
|
public static char[] getPassword(EditText text, boolean clear) {
|
||||||
char[] password = getEditTextChars(text);
|
char[] password = getEditTextChars(text);
|
||||||
if (clear) {
|
if (clear) {
|
||||||
text.getText().clear();
|
clearPassword(text);
|
||||||
}
|
}
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void clearPassword(EditText text) {
|
||||||
|
text.getText().clear();
|
||||||
|
}
|
||||||
|
|
||||||
public static char[] getEditTextChars(EditText text) {
|
public static char[] getEditTextChars(EditText text) {
|
||||||
Editable editable = text.getText();
|
Editable editable = text.getText();
|
||||||
char[] chars = new char[editable.length()];
|
char[] chars = new char[editable.length()];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue