sjhoeksma / cordova-plugin-keychain-touch-id

Touch ID plugin with saving password in keychain for IOS and android
87 stars 160 forks source link

IllegalBlockSizeException after deleting a fingerprint on Android 8 #27

Open jonknowles opened 6 years ago

jonknowles commented 6 years ago

I am getting the error message "Failed to encrypt the data with the generated key: IllegalBlockSizeException: null" when I save a credential in an app, delete the associated fingerprint, and try to use the credential again. After the point when I get the error, I can no longer add or verify fingerprint credentials in the app without re-installing. The error appears to be thrown from the onAuthenticatedmethod of FingerprintAuth.java.

It would be nice if after deleting a fingerprint with credentials associated with it and then adding a new one, new credentials using the new fingerprint could then be saved over the old ones.

koenvanzuijlen commented 6 years ago

Also experiencing this, did you ever find a fix? @jonknowles

jonknowles commented 6 years ago

Nope, didn't find a fix, unfortunately.

raphaelratuczne commented 6 years ago

This error occurs on android 8, in my code I have to verify for do not show the option in this version. Works normally on android 7. I am waiting a fix to update my code.

damirarh commented 6 years ago

I created a PR #31 with a fix which works for me. Maybe it will be useful for someone else even if it never gets merged. More details in the PR itself.

dais-set commented 6 years ago

Hi @damirarh thanks for your fix! We can confirm it also works for us (tested on oneplus 3 with latest oreo). We hope the fix makes it into the master branch but we are making our own branch in the meantime.