BiometricSignatureHandler

BiometricSignatureHandler manages the creation, deletion, and use of hardware-backed key pairs with biometric authentication. This class utilizes SignatureHelper to interact with the Android KeyStore.

Parameters

alias

The alias of the key entry in the KeyStore.

Constructors

Link copied to clipboard
constructor(alias: String)

Functions

Link copied to clipboard
fun authenticateAndSignData(data: String, activity: FragmentActivity, onAuthenticationSucceeded: (SignedData?) -> Unit)

Authenticates the user via biometric authentication and signs the given data. Calls the provided callback function with the signed data upon successful authentication.

Link copied to clipboard
Link copied to clipboard
fun exists(): Boolean?
Link copied to clipboard

If strong biometric is available then returns SignatureHelper.generateHardwareBackedKeyPair otherwise returns null.

Link copied to clipboard
Link copied to clipboard
fun verifyData(publicKey: String, data: String, signature: String): Boolean