BiometricAuthenticator

Platform-agnostic contract for performing biometric authentication.

Implementations MUST NOT block the calling thread; all authentication UI/callback handling MUST be encapsulated within the suspend functions below. Neither function throws for expected failure/error/cancellation outcomes — both report failure via a returned Result wrapping a BiometricAuthenticationException.

This interface intentionally accepts and returns only common/primitive types (ByteArray, String, Unit, kotlin.Result)

Inheritors

Functions

Link copied to clipboard
abstract suspend fun decrypt(encryptedData: ByteArray, keyAlias: String): ERROR CLASS: Symbol not found for Result<kotlin/ByteArray>

Performs a biometric authentication challenge bound to the key identified by keyAlias, then uses that key to decrypt encryptedData and returns the result.

abstract suspend fun decrypt(encryptedData: ByteArray, keyAlias: String, iv: ByteArray): ERROR CLASS: Symbol not found for Result<kotlin/ByteArray>

Performs a biometric authentication challenge bound to the key identified by keyAlias, then uses that key and iv to decrypt encryptedData and returns the result.

Link copied to clipboard
abstract suspend fun unlock(): ERROR CLASS: Symbol not found for Result<kotlin/Unit>

Performs a biometric authentication challenge with no associated cryptographic operation.