-1

i am having problem. I have searched google for biometric authentication but all example apis just returns me "authentication success" with boolean value.

Example: https://proandroiddev.com/5-steps-to-implement-biometric-authentication-in-android-dbeb825aeee8

I want to encrypt SQL with user's biometric id. The biometric id will be the key. It can be 256bit or 64bit key.

Is there any library for that ?

Kadir BASOL
  • 729
  • 2
  • 10
  • 20

1 Answers1

0

Have you looked into the authenticate(crypto) methods of either the android.hardware.BiometricPrompt (framework) or androidx.biometric.BiometricPrompt libraries (recommended) APIs?

Here is some reference. You basically initialize a key in KeyStore, wrap it into the appropriate CryptoObject (in your case, probably Cipher for encrypt/decrypt). When you authenticate(crypto), upon user authentication the key becomes unlocked and you can operate with it.

Here's the demo app for the androidx.biometric library

Anas Mehar
  • 2,739
  • 14
  • 25
Kevin
  • 168
  • 11