mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
168 stars 131 forks source link

BadPaddingException: javax.crypto.AEADBadTagException #55

Closed ganjahnavarro closed 7 years ago

ganjahnavarro commented 7 years ago

Hi,

I'm testing a bare sample of this plugin, I just want to ask what to ask if I'm missing something because I'm getting an error of BadPaddingException: javax.crypto.AEADBadTagException, error callback of encrypt is called.

I'm sure fingerprint is available: {"isAvailable":true,"isHardwareDetected":true,"hasEnrolledFingerprints":true}

This is my config:

var encryptConfig = { clientId: "com.phonegap.sample.Sample", username: "currentUser", password: "currentUserPassword" };

and I called it with FingerprintAuth.encrypt(encryptConfig, encryptSuccessCallback, encryptErrorCallback);

encryptErrorCallback is called after dialog is showed and I successfully scanned my fingerprint. I'm using a rooted xiaomi 3s if it's any help.

Thanks

yoprogramo commented 7 years ago

The same for a Xiaomi 5 with Miui 7. Did you solve the problem?

harshvardhan12 commented 7 years ago

Did you checked in devices other than Xiaomi ? i was also having the problem with Xiaomi phones but when i checked in other devices i was not getting this error. not sure what is the issue here.

yoprogramo commented 7 years ago

In fact in my Mi5 does not happend, I suppose it is the Android version (or MIUI one) more than the device itself.

harshvardhan12 commented 7 years ago

Hi wheatley, please provide your suggestion on this as i am also having the same problem. If you say i will explain you the senerio what is happening in my case

mjwheatley commented 7 years ago

From your comments so far it sounds like it may be device specific. Without steps to consistently repeat this issue it would be very difficult to debug. Yes, please describe your issue in more detail.

I have received a bad padding exception, not sure if it is exactly the same or not, after removing fingerprints from the device and adding them back. I had to verify using the backup credentials before I could use fingerprint authentication again.

harshvardhan12 commented 7 years ago

yes, correct that is the exact senerio which you describe in your second paragraph

yoprogramo commented 7 years ago

My case is the exact scenario as @ganjahnavarro in the first message.

mjwheatley commented 7 years ago

Closing this issue. Please reopen the issue if it is still a problem.