authenticateForDecrypt

suspend fun authenticateForDecrypt(activity: FragmentActivity, iv: ByteArray, title: String = "Authenticate", subtitle: String? = null): AuthenticatedCipher

Authenticates the user and returns a cipher ready for decryption.

Exception propagation: android.security.keystore.KeyPermanentlyInvalidatedException is thrown synchronously from WalletKeyManager.cipherForDecrypt BEFORE the biometric prompt is shown. The caller should catch it at the call site and trigger the backup-restore recovery flow.

Parameters

activity

The FragmentActivity hosting the biometric prompt

iv

The 12-byte IV stored alongside the ciphertext during encryption

title

Prompt title shown to the user

subtitle

Optional subtitle (e.g., "Unlock wallet")

Throws

if the device is temporarily locked out

for all other failures