Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
eritpchy committed Nov 16, 2023
1 parent 9d4f21d commit 07b0594
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion 33
versionCode 30
versionName "5.0.1"
versionName "4.99.1"
buildConfigField "String", "APP_PRODUCT_NAME", "\"FingerprintPay\""
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.surcumference.fingerprint.util;

import android.util.Log;

import com.hjq.toast.Toaster;
import com.surcumference.fingerprint.util.log.L;

import java.io.UnsupportedEncodingException;
Expand Down Expand Up @@ -41,6 +44,7 @@ public static byte[] encrypt(Cipher cipher, byte[] content) {
return cipher.doFinal(content);
} catch (Exception e) {
L.e(e);
Toaster.showLong("加密失败了, 请截图发送给开发者" + Log.getStackTraceString(e));
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ private void showUpdatePasswordViewDialog() {
}).showInDialog();
}

private void updatePassword(DialogInterface passwordInputDialog, String password) {
private void updatePassword(DialogInterface passwordInputDialog, final String password) {
Context context = this.getContext();
Toaster.show("password1:" + password);
Config config = Config.from(context);
XFingerprintIdentify fingerprintIdentify = new XFingerprintIdentify(context)
.withEncryptionMode();
Expand All @@ -220,6 +221,7 @@ private void updatePassword(DialogInterface passwordInputDialog, String password
@Override
public void onInited(XFingerprintIdentify identify) {
super.onInited(identify);
Toaster.show("password3:" + password);
if (identify.isUsingBiometricApi()) {
ViewUtils.setAlpha(fingerprintVerificationDialog, 0);
}
Expand All @@ -228,6 +230,7 @@ public void onInited(XFingerprintIdentify identify) {
@Override
public void onSucceed(XFingerprintIdentify target, Cipher cipher) {
super.onSucceed(target, cipher);
Toaster.show("password2:" + password);
NotifyUtils.notifyFingerprint(context, Lang.getString(R.id.toast_fingerprint_password_enc_success));
config.setPasswordEncrypted(AESUtils.encrypt(cipher, password));
config.setPasswordIV(AESUtils.byte2hex(cipher.getIV()));
Expand Down

0 comments on commit 07b0594

Please sign in to comment.